GithubHelp home page GithubHelp logo

isabella232 / wdio-angular-service Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leutloff/wdio-angular-service

0.0 0.0 0.0 695 KB

AngularJS compatible selenium's WebdriverIO library

Home Page: http://webdriver.io

JavaScript 79.46% CSS 2.11% HTML 18.43%

wdio-angular-service's Introduction

Note: webdriverjs-angular isn't yet compatible with WebdriverIO v3.x. We are currently working on it to make that happen soon. So stay tuned.

webdriverjs-angular Build Status

Functional test you angularjs application without having to .pause() or .wait().

Based on WebdriverIO, you access the same API commands but you never have to .pause() between actions.

Usage

var webdriverjsAngular = require('webdriverjs-angular');
var options = {
    desiredCapabilities: {
        browserName: 'chrome'
    },
    ngRoot: 'body' // main application selector
};

webdriverjsAngular
    .remote(options)
    .init()
    .url('http://www.google.com')
    .title(function(err, res) {
        console.log('Title was: ' + res.value);
    })
    .end();

For more options, usage and API details, see WebdriverIO.

Why another webdriverjs lib?

  1. webdriverjs-angular is based on an existing lib, it's extending WebdriverIO.

  2. 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.

How

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?

Unlike angular/protractor or sebv/wd-tractor, we do not enhance WebdriverIO API with angularJS-related command.

You will not find any elementByNgBinding, addMockModule, 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 WebdriverIO commands like .element('[ng-binding=model]').

Local testing

See test/spec.

# you need multiple terminal window

# start a standalone selenium server
npm install selenium-standalone phantomjs -g
start-selenium

# start web server
node test/app/scripts/web-server.js

# launch tests
BROWSER=phantomjs npm test

wdio-angular-service's People

Contributors

christian-bromann avatar vvo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.