Last active
December 19, 2017 09:05
-
-
Save giltayar/8872b1ba356389b2db68cddf0171869f 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, Key, until} = require('selenium-webdriver'); | |
let driverPromise = new Builder() | |
.forBrowser('firefox') | |
.build(); | |
driverPromise.then(driver => driver.get('http://www.google.com/ncr')) | |
.then(() => driver.findElement(By.name('q'))) | |
.then(element => element.sendKeys('webdriver', Key.RETURN)) | |
.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