Created
April 1, 2020 19:48
-
-
Save Damian89/e0767e74fb4320cfb6b84fd43af3309e 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
const {Builder, By, until} = require('selenium-webdriver'); | |
new Builder() | |
.forBrowser('firefox') | |
.build() | |
.then(driver => { | |
return driver.get('http://www.google.com/ncr') | |
.then(_ => driver.findElement(By.name('q')).sendKeys('webdriver')) | |
.then(_ => driver.findElement(By.name('btnK')).click()) | |
.then(_ => driver.wait(until.titleIs('webdriver - Google Search'), 1000)) | |
.then(_ => driver.quit()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment