Skip to content

Instantly share code, notes, and snippets.

@cameronehrlich
Last active July 13, 2016 09:09
Show Gist options
  • Select an option

  • Save cameronehrlich/e0f014da5d6c6f848a76d0c077679eb6 to your computer and use it in GitHub Desktop.

Select an option

Save cameronehrlich/e0f014da5d6c6f848a76d0c077679eb6 to your computer and use it in GitHub Desktop.
// google_search.js
var webdriver = require('selenium-webdriver'),
By = webdriver.By,
until = webdriver.until;
var driver = new webdriver.Builder()
.forBrowser('firefox')
.build();
driver.get('http://www.google.com/ncr');
driver.findElement(By.name('q')).sendKeys('webdriver');
driver.findElement(By.name('btnG')).click();
driver.wait(until.titleIs('webdriver - Google Search'), 1000);
driver.quit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment