Skip to content

Instantly share code, notes, and snippets.

@eliasnogueira
Created August 21, 2022 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eliasnogueira/c647c0f1b64d88487ceb44d0f0603eeb to your computer and use it in GitHub Desktop.
Save eliasnogueira/c647c0f1b64d88487ceb44d0f0603eeb to your computer and use it in GitHub Desktop.
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