THIS PACKAGE IS NO LONGER MAINTAINED Use at your own risk :) You might consider using Chimp instead.
We plan to put end-to-end testing inside Jasmine in the near future, you can speed this up by sponsoring this release. See this page for details
A WebdriverIO wrapper for UI testing using any testing framework.
- Starts PhantomJS in webdriver mode
- Provides you with a browser you can automate using the industry-standard Selenium Webdriver
To learn more about testing with Meteor, consider purchasing our book The Meteor Testing Manual.
Your support helps us continue our work on Velocity and related frameworks.
meteor add xolvio:webdriver
The following examples are for Mocha. You can also use Webdriver.io with Jasmine.
describe('Browser testing', function(done) {
var _browser;
before(function (done) {
wdio.getGhostDriver(function(browser) {
_browser = browser;
done();
});
})
it('should have the correct title', function (done) {
_browser.
init().
url('http://www.google.com').
title(function(err, res) {
console.log('Title was: ' + res.value);
}).
end().
call(done);
});
});
You can also use ChromeDriver like this (no need to download anything!):
describe('Browser testing', function (done) {
var _browser;
before(function(done) {
wdio.getChromeDriver(function (browser) {
_browser = browser;
done();
});
})
// see above
});
For more examples and usage, see the webdriver.io website.
If this package is included for testing your Meteor app, it should work fine out of the box. You may encounter issues when you try
to run on the CI server, as it doesn't seem to detect the right phantom.js binary to download. You can instead just npm install -g phantomjs
and then set PHANTOM_PATH
as an environment variable when you run your Meteor CI test build.
- WebdriverIO
- Use PhantomJS in GhostDriver mode
- Automatically Download ChromeDriver
- Automatically Download Selenium Server
- Reuse the selenium webdriver session between tests so the browser does not flicker on and off
- Support multiple window testing
- Specify the browser matrix to run in development
- Specify the browser matrix to run in continuous integration mode
- SauceLabs & BrowserStack support