0.2.2 • Published 6 years ago

wdio-applitools-service v0.2.2

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

WebdriverIO Applitools Service

A WebdriverIO service for visual regression testing using Applitools

Installation

The easiest way is to keep wdio-applitools-service as a devDependency in your package.json.

{
  "devDependencies": {
    "wdio-applitools-service": "^5.0.0"
  }
}

You can simple do it by:

npm install wdio-applitools-service --save-dev

Instructions on how to install WebdriverIO can be found here.

Configuration

In order to use the service you need to set applitoolsKey in your wdio.conf.js config file or have APPLITOOLS_KEY stored in your environment so that it can access the Applitools API. Also make sure that you added applitools to your service list, e.g.

// wdio.conf.js
export.config = {
  // ...
  services: ['applitools'],
  applitools: {
    // options
    // ...
  }
  // ...
};

Usage

Once the service is added you just need to call the browser.takeSnapshot command to compare images within the badge. The command takes a screenshot name so Applitools can compare it always with the correct image from the baseline, e.g.

describe('My Google Search', () => {
    it('should open the page', () => {
        browser.url('http://google.com')
        browser.takeSnapshot('main page')
    })

    it('should search for something', () => {
        $('#lst-ib').addValue('WebdriverIO ❤️  Applitools')
        browser.keys('Enter')
        browser.takeSnapshot('search')
    })
})

On the Applitools dashboard you should now find the test with two images:

Applitools Dashboard

Options

viewport

Viewport with which the screenshots should be taken.

Type: Object Default: {'width': 1440, 'height': 900}

5.0.0-beta.3

6 years ago

5.0.0-beta.2

6 years ago

5.0.0-beta.1

6 years ago

5.0.0-beta.0

6 years ago

5.0.0-alpha.14

6 years ago

5.0.0-alpha.13

6 years ago

5.0.0-alpha.12

6 years ago

5.0.0-alpha.11

6 years ago

5.0.0-alpha.10

6 years ago

5.0.0-alpha.9

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.1

6 years ago