// Path: src/main/java/com/frameworkium/core/ui/element/OptimisedStreamTable.java
// public class OptimisedStreamTable extends AbstractStreamTable {
// 
//   @FindBy(css = "thead > tr > th")
//   private List<WebElement> headerCells;
// 
//   @FindBy(css = "tbody > tr")
//   private List<WebElement> rows;
// 
//   @Override
//   protected Stream<WebElement> headerCells() {
//     return headerCells.stream();
//   }
// 
//   @Override
//   protected Stream<WebElement> rows() {
//     return rows.stream();
//   }
// 
//   @Override
//   protected By cellLocator() {
//     return By.cssSelector("td");
//   }
// 
// }
// 
// Path: src/main/java/com/frameworkium/core/ui/pages/PageFactory.java
// public class PageFactory {
// 
//   private static final Logger logger = LogManager.getLogger();
// 
//   protected PageFactory() {
//   }
// 
//   public static <T extends BasePage<T>> T newInstance(Class<T> clazz) {
//     return instantiatePageObject(clazz).get();
//   }
// 
//   public static <T extends BasePage<T>> T newInstance(
//       Class<T> clazz, Duration timeout) {
//     return instantiatePageObject(clazz).get(timeout);
//   }
// 
//   public static <T extends BasePage<T>> T newInstance(
//       Class<T> clazz, String url) {
//     return instantiatePageObject(clazz).get(url);
//   }
// 
//   public static <T extends BasePage<T>> T newInstance(
//       Class<T> clazz, String url, Duration timeout) {
//     return instantiatePageObject(clazz).get(url, timeout);
//   }
// 
//   private static <T extends BasePage<T>> T instantiatePageObject(Class<T> clazz) {
//     try {
//       return clazz.getDeclaredConstructor().newInstance();
//     } catch (InstantiationException | IllegalAccessException
//         | NoSuchMethodException | InvocationTargetException e) {
//       logger.fatal("Unable to instantiate PageObject", e);
//       throw new IllegalStateException("Unable to instantiate PageObject", e);
//     }
//   }
// }


import com.frameworkium.core.ui.annotations.Visible;
import com.frameworkium.core.ui.element.OptimisedStreamTable;
import com.frameworkium.core.ui.pages.BasePage;
import com.frameworkium.core.ui.pages.PageFactory;
import org.openqa.selenium.NotFoundException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.FindBy;
import java.util.function.Predicate;
import java.util.stream.Stream;
package com.frameworkium.integration.wikipedia.pages;




/**
 * This page uses OptimisedStreamTable, this is slower than using Lists of
 * WebElements for columns, especially when running over a grid due to the far
 * greater number of page lookups required. This is even worse for StreamTable,
 * but StreamTable copes with a wider variety of Tables.
 *
 * <p>This is a trade-off between readability, maintainability and performance.
 *
 * <p>This approach is great if the table and tests are likely to change often.
 */
public class EnglishCountiesPage extends BasePage<EnglishCountiesPage> {

    @Visible
    @CacheLookup
    @FindBy(css = "table.wikitable") // luckily there's only one
    private OptimisedStreamTable listTable;

    public static EnglishCountiesPage open() {
// Path: src/main/java/com/frameworkium/core/ui/element/OptimisedStreamTable.java
// public class OptimisedStreamTable extends AbstractStreamTable {
// 
//   @FindBy(css = "thead > tr > th")
//   private List<WebElement> headerCells;
// 
//   @FindBy(css = "tbody > tr")
//   private List<WebElement> rows;
// 
//   @Override
//   protected Stream<WebElement> headerCells() {
//     return headerCells.stream();
//   }
// 
//   @Override
//   protected Stream<WebElement> rows() {
//     return rows.stream();
//   }
// 
//   @Override
//   protected By cellLocator() {
//     return By.cssSelector("td");
//   }
// 
// }
// 
// Path: src/main/java/com/frameworkium/core/ui/pages/PageFactory.java
// public class PageFactory {
// 
//   private static final Logger logger = LogManager.getLogger();
// 
//   protected PageFactory() {
//   }
// 
//   public static <T extends BasePage<T>> T newInstance(Class<T> clazz) {
//     return instantiatePageObject(clazz).get();
//   }
// 
//   public static <T extends BasePage<T>> T newInstance(
//       Class<T> clazz, Duration timeout) {
//     return instantiatePageObject(clazz).get(timeout);
//   }
// 
//   public static <T extends BasePage<T>> T newInstance(
//       Class<T> clazz, String url) {
//     return instantiatePageObject(clazz).get(url);
//   }
// 
//   public static <T extends BasePage<T>> T newInstance(
//       Class<T> clazz, String url, Duration timeout) {
//     return instantiatePageObject(clazz).get(url, timeout);
//   }
// 
//   private static <T extends BasePage<T>> T instantiatePageObject(Class<T> clazz) {
//     try {
//       return clazz.getDeclaredConstructor().newInstance();
//     } catch (InstantiationException | IllegalAccessException
//         | NoSuchMethodException | InvocationTargetException e) {
//       logger.fatal("Unable to instantiate PageObject", e);
//       throw new IllegalStateException("Unable to instantiate PageObject", e);
//     }
//   }
// }


// Path: src/test/java/com/frameworkium/integration/wikipedia/pages/EnglishCountiesPage.java
import com.frameworkium.core.ui.annotations.Visible;
import com.frameworkium.core.ui.element.OptimisedStreamTable;
import com.frameworkium.core.ui.pages.BasePage;
import com.frameworkium.core.ui.pages.PageFactory;
import org.openqa.selenium.NotFoundException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.FindBy;
import java.util.function.Predicate;
import java.util.stream.Stream;

package com.frameworkium.integration.wikipedia.pages;




/**
 * This page uses OptimisedStreamTable, this is slower than using Lists of
 * WebElements for columns, especially when running over a grid due to the far
 * greater number of page lookups required. This is even worse for StreamTable,
 * but StreamTable copes with a wider variety of Tables.
 *
 * <p>This is a trade-off between readability, maintainability and performance.
 *
 * <p>This approach is great if the table and tests are likely to change often.
 */
public class EnglishCountiesPage extends BasePage<EnglishCountiesPage> {

    @Visible
    @CacheLookup
    @FindBy(css = "table.wikitable") // luckily there's only one
    private OptimisedStreamTable listTable;

    public static EnglishCountiesPage open() {
        return PageFactory.newInstance(EnglishCountiesPage.class,