// 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.htmlelements.annotations.Timeout;
import com.frameworkium.core.htmlelements.element.Button;
import com.frameworkium.core.htmlelements.element.HtmlElement;
import com.frameworkium.core.ui.annotations.Invisible;
import com.frameworkium.core.ui.annotations.Visible;
import com.frameworkium.core.ui.pages.BasePage;
import com.frameworkium.core.ui.pages.PageFactory;
import io.qameta.allure.Step;
import org.openqa.selenium.support.FindBy;
import static org.openqa.selenium.support.ui.ExpectedConditions.visibilityOf;
package com.frameworkium.integration.theinternet.pages;



public class DynamicLoadingExamplePage extends BasePage<DynamicLoadingExamplePage> {

    @Visible
    @FindBy(css = "#start button")
    private Button startButton;

    @Invisible
    @Timeout(0) // prevents page load taking 5s due to implicit timeout
    @FindBy(id = "finish")
    private HtmlElement dynamicElement;

    public static DynamicLoadingExamplePage openExampleTwo() {
// 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/theinternet/pages/DynamicLoadingExamplePage.java
import com.frameworkium.core.htmlelements.annotations.Timeout;
import com.frameworkium.core.htmlelements.element.Button;
import com.frameworkium.core.htmlelements.element.HtmlElement;
import com.frameworkium.core.ui.annotations.Invisible;
import com.frameworkium.core.ui.annotations.Visible;
import com.frameworkium.core.ui.pages.BasePage;
import com.frameworkium.core.ui.pages.PageFactory;
import io.qameta.allure.Step;
import org.openqa.selenium.support.FindBy;
import static org.openqa.selenium.support.ui.ExpectedConditions.visibilityOf;

package com.frameworkium.integration.theinternet.pages;



public class DynamicLoadingExamplePage extends BasePage<DynamicLoadingExamplePage> {

    @Visible
    @FindBy(css = "#start button")
    private Button startButton;

    @Invisible
    @Timeout(0) // prevents page load taking 5s due to implicit timeout
    @FindBy(id = "finish")
    private HtmlElement dynamicElement;

    public static DynamicLoadingExamplePage openExampleTwo() {
        return PageFactory.newInstance(