Selenium 2.0 bindings for NodeJS
Run your tests in the cloud
Services like Sauce Labs or BrowserStack provide selenium testing on remote hosts.
Be able to run tests on a wide collection of plattforms, devices and browser combinations
without any configuration in your enviroment.
Webdriverjs supports services like:
Sauce Labs
BrowserStack
TestingBot
What is WebdriverIO?
WebdriverIO lets you control a browser or a mobile application with just a few
lines of code. Your test code will look simple, concise and easy to read. Creating
automated tests is as easy as:
1 2 3 4 5 6 7 8 9 10 11 12
| var webdriverio = require('webdriverio'); var options = { desiredCapabilities: { browserName: 'chrome' } }; webdriverio .remote(options) .init() .url('http://www.google.com') .title(function(err, res) { console.log('Title was: ' + res.value); }) .end();
|
How does it work?
WebdriverIO is an open source testing utility for nodejs. It makes it possible
to write super easy selenium tests with Javascript in your favorite BDD or TDD
test framework. Even Cucumber tests are supported.
It basically sends requests to a Selenium server via the WebDriver Wire Protocol
and handles its response. These requests are wrapped in useful commands, which
provide callbacks to test several aspects of your site in an automated way.