Untitled

 avatar
unknown
plain_text
24 days ago
684 B
5
Indexable
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

public class HomePage extends BasePage {

    @FindBy(css = "a[title='My Account']")
    private WebElement myAccountLink;

    @FindBy(linkText = "Register")
    private WebElement registerLink;

    @FindBy(css = "a[href*='/login']")
    private WebElement loginLink;

    public HomePage(WebDriver driver) {
        super(driver);
    }

    public void clickMyAccountLink() {
        myAccountLink.click();
    }

    public void clickLoginLink() {
        loginLink.click();
    }

    public void clickRegisterLink() {
        registerLink.click();
    }
}
Leave a Comment