Last active
June 15, 2018 01:04
-
-
Save giltayar/a3c3739d46700c97f26c2792a76bd681 to your computer and use it in GitHub Desktop.
This file contains hidden or 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'); | |
async function main() { | |
let driver = await new Builder() | |
.forBrowser('firefox') | |
.build(); | |
await driver.get('http://www.google.com/ncr') | |
const element = await driver.findElement(By.name('q')) | |
await element.sendKeys('webdriver', Key.RETURN) | |
await driver.wait(until.titleIs('webdriver - Google Search'), 1000) | |
await driver.quit() | |
} | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment