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