Socket
Socket
Sign inDemoInstall

wd-parallel-async

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wd-parallel-async

Run your WD.js driven tests in multiple browsers, at the same time


Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Run your WD.js driven tests in multiple browsers, at the same time !

Update node to latest

http://nodejs.org/#download

Install

npm install wd-parallel-async

Authors

  • Mathieu Sabourin (OniOni)

License

Writing a test!

Start by importing the required libraries.

var webdriver = require('../lib/main')
  , assert = require('assert');

Then create the parallelizer.

var browsers = p_webdriver.remote();

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.test = function(browser, desired) {

    console.log("server status:", browser.status());
    browser.init(desired);
        
    browser.get("http://google.com");
    console.log("title is "+browser.title());

    var queryField = browser.elementByName('q');
    browser.type(queryField, "Hello World");
    browser.type(queryField, "\n");

    browser.setWaitTimeout(3000);
    browser.elementByCss('#ires'); // waiting for new page to load
    console.log(browser.title());

    browser.quit();

};

Load the configuration for all your browsers from your configuration file.

//Load configuration file
browsers.loadConfigFile("examples/config.json");

Now you can go ahead and run the test !

//Run test on all browsers
browsers.run();

Supported Methods

This uses node-wd-sync written by sebv so you can check this page on supported methods.

Full JsonWireProtocol mapping:

full 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!

...

FAQs

Package last updated on 22 Jun 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc