Skip to content

Instantly share code, notes, and snippets.

@jzelenkov
Last active August 29, 2015 14:04
Show Gist options
  • Save jzelenkov/ed54386bafa9f9e71b01 to your computer and use it in GitHub Desktop.
Save jzelenkov/ed54386bafa9f9e71b01 to your computer and use it in GitHub Desktop.
make your browsers test for you article source code. 01_webdriver_js_wrapper_src.js
driver.findElement(webdriver.By.name('whoami'))
.sendKeys('WebDriver was here!');
driver.findElement(webdriver.By.id('greet'))
.click();
driver.findElement(webdriver.By.id('message'))
.getText()
.then(function(val) {
assert.equal(
val, 'WebDriver was here!',
'Messages should be the same');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment