nightwing
An intuitive interaction library based on webdriverjs
Install
$ npm install --save nightwing
Usage
nightwing works by injecting several intuitive commands globally into your tests.
By default, mochajs is used as the test runner, but this can be
configured using the --runner
flag or programmatically by passing in { runner: foo }
to the Nightwing
constructor. Note currently, only Mocha is supported, but
we plan to continue building out support for more runners in the future
myFirstTest.js
describe("foo", function () {
before(function () {
return browser.get("http://www.apple.com");
});
it("bar", function () {
fillIn("input[name=q]", "foobar")
click(".submit");
expect(title()).to.eql("foobar - Google Search");
});
});
Programmatic Interface
runner.js
var Nightwing = require("nightwing");
var nightwing = new Nightwing(options);
nightwing.addFile("/path/to/file.js")
nightwing.run(function (results) {
});
options
Since nightwing injects itself into to the test runner, all options available to the test runner are availble to nigthwing.
Command-line
$ nightwing [options] [files|dir]
Commands api
// TODO
License
MIT © Dylan Foster