Skip to content

Instantly share code, notes, and snippets.

@qagoose
Last active Apr 7, 2018
Embed
What would you like to do?
public class LoginPage {
private WebDriver driver;
public LoginPage(WebDriver driver) {
this.driver = driver;
}
public void fillEmailAddressField(String text) {
driver.findElement(By.id("emailAddress")).sendKeys(text);
}
public void fillPasswordField(String text) {
driver.findElement(By.id("password")).sendKeys(text);
}
public void tickKeepMeLoggedIn() {
driver.findElement(By.id("keepMeLoggedIn")).click();
}
public void clickLoginButton() {
driver.findElement(By.id("loginBtn")).click();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment