some glue to make test automation better

Usage no npm install needed!

<script type="module">
  import webPilot from 'https://cdn.skypack.dev/web-pilot';



This module relies on Selenium WebDriver to automate tests.

The module exposes a factory function which supports the following options (and their defaults):

    debug:       false,
    endpoint:    ['localhost', 4444],
    sauceFields: {}

It works with SauceLabs services. Here's an example config:

    debug:       false,
    endpoint:    ['ondemand.saucelabs.com', 80, 'SAUCEUSER', 'SAUCEKEY'],
    sauceFields: {name:'some unit test project name', tags:['new', 'stuff']}

The factory provides the following functions:

unit(profile, page, cb);

units(profiles, pages, cb);

TODO functional(profile, fn, cb);

TODO functionals(profiles, fns, cb);

A profile is an object defining environment restrictions such as platform, browserName and version.

A page is an HTTP URL. If using a grid such as SauceLabs' make sure the URLs are reachable. Unit tests expect pages with QUnit tests.

A function receives a wd browser object and a callback. See here for additional information: