Advertisement
ponder6168

Untitled

May 31st, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public static void loginWithFirefox(String loginLinkId, String userName, String password) {
  2. try {
  3. driver.findElementById(loginLinkId).click();
  4. Thread.sleep(2000);
  5. Alert alert = driver.switchTo().alert();
  6. alert.sendKeys(userName + Keys.TAB.toString()+ password);
  7. alert.accept();
  8. } catch (Exception e) {
  9. logExceptionMessage(e, "userName = " + userName + " password = " + password);
  10. }
  11.  
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement