Created
August 21, 2022 11:19
-
-
Save eliasnogueira/c647c0f1b64d88487ceb44d0f0603eeb to your computer and use it in GitHub Desktop.
Simple Page Objects example without the usage of Page Factory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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