Selenium Java - Page Object Model
Given the following code snippet, what will be the output when
button.isDisplayed() is called?public class LoginPage {
@FindBy(name = "loginBtn")
WebElement button;
public LoginPage(WebDriver driver) {
PageFactory.initElements(driver, this);
}
}
// In test method:
LoginPage page = new LoginPage(driver);
boolean visible = page.button.isDisplayed();
System.out.println(visible);