// 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/seleniumhq/components/HeaderComponent.java
// @FindBy(className = "navbar")
// public class HeaderComponent extends HtmlElement {
// 
//     @FindBy(css = "#main_navbar [href='/downloads']")
//     private Link downloadLink;
// 
//     public SeleniumDownloadPage clickDownloadLink() {
//         UITestLifecycle.get().getWait().until(ExpectedConditions.elementToBeClickable(downloadLink));
//         downloadLink.click();
//         return PageFactory.newInstance(SeleniumDownloadPage.class);
//     }
// 
// }


import com.frameworkium.core.ui.annotations.Visible;
import com.frameworkium.core.ui.pages.BasePage;
import com.frameworkium.core.ui.pages.PageFactory;
import com.frameworkium.integration.seleniumhq.components.HeaderComponent;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.FindBy;
package com.frameworkium.integration.seleniumhq.pages;


public class HomePage extends BasePage<HomePage> {

    @CacheLookup
    @Visible
    private HeaderComponent header;

    @FindBy(css = "button[data-target='#main_navbar']")
    private WebElement menuLink;

    public static HomePage open() {
// 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/seleniumhq/components/HeaderComponent.java
// @FindBy(className = "navbar")
// public class HeaderComponent extends HtmlElement {
// 
//     @FindBy(css = "#main_navbar [href='/downloads']")
//     private Link downloadLink;
// 
//     public SeleniumDownloadPage clickDownloadLink() {
//         UITestLifecycle.get().getWait().until(ExpectedConditions.elementToBeClickable(downloadLink));
//         downloadLink.click();
//         return PageFactory.newInstance(SeleniumDownloadPage.class);
//     }
// 
// }


// Path: src/test/java/com/frameworkium/integration/seleniumhq/pages/HomePage.java
import com.frameworkium.core.ui.annotations.Visible;
import com.frameworkium.core.ui.pages.BasePage;
import com.frameworkium.core.ui.pages.PageFactory;
import com.frameworkium.integration.seleniumhq.components.HeaderComponent;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.FindBy;

package com.frameworkium.integration.seleniumhq.pages;


public class HomePage extends BasePage<HomePage> {

    @CacheLookup
    @Visible
    private HeaderComponent header;

    @FindBy(css = "button[data-target='#main_navbar']")
    private WebElement menuLink;

    public static HomePage open() {
        return PageFactory.newInstance(