WebdriverIO lib compatible with angular.js apps
Functional test you angularjs application without having to
Based on WebdriverIO, you access
the same API commands but you never have to
.pause() between actions.
var webdriverjsAngular = require'webdriverjs-angular';var options =desiredCapabilities:browserName: 'chrome'ngRoot: 'body' // main application selector;webdriverjsAngularremoteoptionsiniturl''titleconsole.log'Title was: ' + resvalue;end;
For more options, usage and API details, see WebdriverIO.
webdriverjs-angular is based on an existing lib, it's extending WebdriverIO.
webdriverjs-angular is designed to work well with angularJS applications. AngularJS applications have a specific behavior that needs to be taken care of to provide easy e2e testing.
webdriverjs-angular automatically waits for angularjs to be ready.
So you just have to worry about what you want to do in your tests, not when to do it.
Why not use angular/protractor?
You will not find any
hasElementByNgRepeaterRow or any other specific, angularJS-related methods.
We think your functionnal tests should be as framework-agnostic as possible.
If you need
elementByNgBinding, just use regular
# you need multiple terminal window# start a standalone selenium servernpm install selenium-standalone phantomjs -gstart-selenium# start web servernode test/app/scripts/web-server.js# launch testsBROWSER=phantomjs npm test