Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- driver.get("http://somefakewebsite.com")
- .then(function(){ driver.findElement(By.id("login")).sendKeys("myLogin") })
- .then(function(){ driver.findElement(By.id("password").sendKeys("myPassword") })
- .then(function(){ driver.findElement(By.id("submit").click() })
- function inputLogin(driver){
- driver.findElement(By.id("login")).sendKeys("myLogin");
- }
- function inputPassword(driver){
- driver.findElement(By.id("password")).sendKeys("myPassword");
- }
- function clickSubmit(driver){
- driver.findElement(By.id("submit")).click();
- }
- driver.get("http://somefakewebsite.com")
- .then(inputLogin(driver))
- .then(inputPassword(driver))
- .then(clickSubmit(driver))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement