Skip to content

Instantly share code, notes, and snippets.

@ivaravko
Created November 13, 2011 19:38
Show Gist options
  • Select an option

  • Save ivaravko/1362557 to your computer and use it in GitHub Desktop.

Select an option

Save ivaravko/1362557 to your computer and use it in GitHub Desktop.
WebDriverJS Tests
var webdriverjs = require("webdriverjs");
var client = webdriverjs.remote({
host:"localhost",
port: 4444,
desiredCapabilities:{browserName:"firefox"}
});
client
.testMode()
.init()
.url("http://www.yandex.ru/")
.getLocation("input.b-form-button__input", function(result){ console.log(result); })
.setValue("input#text", "WebDriverJS")
.click("input.b-form-button__input")
.pause(2000)
.getLocation("input.b-form-button__input", function(result){ console.log(result); })
.pause(3000)
.end();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment