Skip to content

Instantly share code, notes, and snippets.

@brobles82
Last active February 5, 2020 19:52
Show Gist options
  • Save brobles82/ce0b0c3d7cde18ff0f982dd2a006f2e0 to your computer and use it in GitHub Desktop.
Save brobles82/ce0b0c3d7cde18ff0f982dd2a006f2e0 to your computer and use it in GitHub Desktop.
public class LogIn {
public void LoginAsUser(String name, String password) {
WebDriver webDriver = Driver.webDriver;
webDriver.findElement(By.id("login")).sendKeys(name);
webDriver.findElement(By.id("password")).sendKeys(password);
webDriver.findElement(By.linkText("Log in")).click();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment