Last active
July 6, 2016 05:02
-
-
Save streichsbaer/5f6fe2f17ad1a89763bb4debf9927d27 to your computer and use it in GitHub Desktop.
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 RopeyTasksApplication extends WebApplication implements ILogin, | |
ILogout,INavigable { | |
[..] | |
@Override | |
public void openLoginPage() { | |
driver.get(Config.getInstance().getBaseUrl() + "user/login"); | |
findAndWaitForElement(By.id("username")); | |
} | |
[..] | |
@Override | |
public void login(Credentials credentials) { | |
UserPassCredentials creds = new UserPassCredentials(credentials); | |
driver.findElement(By.id("username")).clear(); | |
driver.findElement(By.id("username")).sendKeys(creds.getUsername()); | |
driver.findElement(By.id("password")).clear(); | |
driver.findElement(By.id("password")).sendKeys(creds.getPassword()); | |
driver.findElement(By.name("_action_login")).click(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment