Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. driver.get("http://somefakewebsite.com")
  2. .then(function(){ driver.findElement(By.id("login")).sendKeys("myLogin") })
  3. .then(function(){ driver.findElement(By.id("password").sendKeys("myPassword") })
  4. .then(function(){ driver.findElement(By.id("submit").click() })
  5.  
  6. function inputLogin(driver){
  7. driver.findElement(By.id("login")).sendKeys("myLogin");
  8. }
  9.  
  10. function inputPassword(driver){
  11. driver.findElement(By.id("password")).sendKeys("myPassword");
  12. }
  13.  
  14. function clickSubmit(driver){
  15. driver.findElement(By.id("submit")).click();
  16. }
  17.  
  18. driver.get("http://somefakewebsite.com")
  19. .then(inputLogin(driver))
  20. .then(inputPassword(driver))
  21. .then(clickSubmit(driver))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement