Run your WD.js driven tests in multiple browsers, at the same time !
Update node to latest
Install
npm install wd-parallel-async
Authors
- Mathieu Sabourin (OniOni)
License
- License - Apache 2: http://www.apache.org/licenses/LICENSE-2.0
Writing a test!
Start by importing the required libraries.
var webdriver = assert = ;
Then create the parallelizer.
var browsers = p_webdriver;
Now add a test method to the multiple browser object. This method needs to arguments named browser and desired.
- This method contains your test logic.
- Test should be run as if to be run on an object named browser.
browsers { console; browser; browser; console; var queryField = browser; browsertypequeryField "Hello World"; browsertypequeryField "\n"; browser; browser; // waiting for new page to load console; browser; };
Load the configuration for all your browsers from your configuration file.
//Load configuration filebrowsers;
Now you can go ahead and run the test !
//Run test on all browsersbrowsers;
Supported Methods
This uses node-wd-sync written by sebv so you can check this page on supported methods.
Full JsonWireProtocol mapping:
More docs!
WD is simply implementing the Selenium JsonWireProtocol, for more details see the official docs: - http://code.google.com/p/selenium/wiki/JsonWireProtocol
Run the tests!
...