Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple Page Objects example without the usage of Page Factory
public class PageObjectExample {
private final WebDriver driver;
public PageObjectExample(WebDriver driver) {
this.driver = driver;
}
public void login(String email, String password) {
driver.findElement(By.id("email")).sendKeys(email);
driver.findElement(By.id("password")).sendKeys(password);
driver.findElement(By.name("next")).click();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment