-
-
Save lfryc/3508324 to your computer and use it in GitHub Desktop.
Graphene Login component
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 LoginComponent { | |
@Root | |
private WebElement driver; | |
@FindBy(id="loginForm:username") | |
private WebElement usernameInput; | |
@FindBy(id="loginForm:password") | |
private WebElement passwordInput; | |
@FindBy(id="loginForm:login") | |
private WebElement loginButton; | |
public void setUsername(Object username) { | |
usernameInput.sendKeys(username.toString()); | |
} | |
public void setPassword(Object password) { | |
passwordInput.sendKeys(password.toString()); | |
} | |
public void submit() { | |
loginButton.submit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment