7.7.6 • Published 3 years ago

@wdio/applitools-service v7.7.6

Weekly downloads
1,205
License
MIT
Repository
github
Last release
3 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": "^6.3.6"
    }
}

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 pass the Applitools API key. This can be set in your wdio.conf.js config file or pass APPLITOOLS_KEY 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', {
            key: '<APPLITOOLS_KEY>', // can be passed here or via environment variable `APPLITOOLS_KEY`
            serverUrl: 'https://<org>eyesapi.applitools.com', // optional, can be passed here or via environment variable `APPLITOOLS_SERVER_URL`
            appName: 'myApp',
            // options
            proxy: { // optional
                url: 'http://corporateproxy.com:8080'
                username: 'username', // optional
                password: 'secret', // optional
                isHttpOnly: true // optional
            },
            viewport: { // optional
                width: 1920,
                height: 1080
            }
        }]
    ],
    // ...
};

Usage

Once the service is added you just need to call either the browser.takeSnapshot command or the browser.takeRegionSnapshot command to compare images within the badge. The browser.takeRegionSnapshot command takes two additional parameters: 1) region which must be of type Region|webdriver.WebElement|EyesRemoteWebElement|webdriver.By, and 2) frame of type webdriver.WebElement|EyesRemoteWebElement|string; see further details here. 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')
    })

    it('should open the page and take snapshot of the region with reddit icon in upper left', () => {
        browser.url('https://reddit.com')
        browser.takeRegionSnapshot('Reddit icon; main page', 'css=a._30BbATRhFv3V83DHNDjJAO')
    })
})

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

Applitools Dashboard

Configuration Properties

key

Applitools API key to be used. Can be passed via wdio config or via environment variable APPLITOOLS_KEY

  • Optional
  • Type: string

serverUrl

Applitools server URL to be used

  • Optional
  • Type: string
  • Default: Public cloud url

viewport

Viewport with which the screenshots should be taken.

  • Optional
  • Type: object
  • Default: {'width': 1440, 'height': 900}

proxy

Use proxy for http/https connections with Applitools.

  • Optional
  • Type: object
  • Example:
{
  url: 'http://corporateproxy.com:8080'
  username: 'username' // optional
  password: 'secret' // optional
  isHttpOnly: true // optional
}

For more information on WebdriverIO see the homepage.

7.7.5

3 years ago

7.7.6

3 years ago

7.7.4

3 years ago

7.7.0

3 years ago

7.7.3

3 years ago

7.7.2

3 years ago

7.5.3

3 years ago

7.5.2

3 years ago

7.5.1

3 years ago

7.5.0

3 years ago

7.5.7

3 years ago

7.5.6

3 years ago

7.6.1

3 years ago

7.6.0

3 years ago

7.4.6

3 years ago

7.4.5

3 years ago

7.4.2

3 years ago

7.4.1

3 years ago

7.4.0

3 years ago

7.3.1

3 years ago

7.3.0

3 years ago

7.2.3

3 years ago

7.2.2

3 years ago

7.2.1

3 years ago

7.2.0

3 years ago

7.1.1

3 years ago

7.1.0

3 years ago

7.0.8

3 years ago

7.0.9

3 years ago

7.0.7

3 years ago

7.0.5

3 years ago

7.0.4

3 years ago

7.0.3

3 years ago

7.0.2

3 years ago

7.0.0

3 years ago

7.0.1

3 years ago

7.0.0-beta.4

3 years ago

7.0.0-beta.3

3 years ago

7.0.0-beta.2

3 years ago

7.0.0-beta.1

3 years ago

7.0.0-beta.0

3 years ago

6.10.10

3 years ago

6.10.4

3 years ago

6.10.0

3 years ago

6.8.0

3 years ago

6.7.3

3 years ago

6.7.0

3 years ago

6.6.3

4 years ago

6.6.0

4 years ago

6.4.7

4 years ago

6.4.0

4 years ago

6.3.6

4 years ago

6.3.0

4 years ago

6.2.0

4 years ago

6.0.16

4 years ago

6.0.12

4 years ago

6.0.11

4 years ago

6.0.10

4 years ago

6.0.8

4 years ago

6.0.7

4 years ago

6.0.6

4 years ago

6.0.4

4 years ago

6.0.1

4 years ago

6.0.0-beta.1

4 years ago

6.0.0-beta.0

4 years ago

6.0.0-alpha.1

4 years ago

6.0.0-alpha.0

4 years ago

5.16.11

4 years ago

5.16.10

4 years ago

5.16.6

4 years ago

5.16.5

4 years ago

5.13.2

5 years ago

5.12.3

5 years ago

5.12.2

5 years ago

5.12.1

5 years ago

5.12.0

5 years ago

5.11.0

5 years ago

5.9.3

5 years ago

5.9.0

5 years ago

5.8.1

5 years ago

5.8.0

5 years ago

5.7.8

5 years ago

5.7.2

5 years ago

5.7.0

5 years ago

5.6.4

5 years ago

5.6.3

5 years ago

5.6.0

5 years ago

5.4.6

5 years ago

5.4.4

5 years ago

5.4.1

5 years ago

5.2.8

5 years ago

5.2.2

5 years ago

5.1.0

5 years ago

5.0.3

5 years ago

5.0.0

5 years ago

5.0.0-beta.16

5 years ago

5.0.0-beta.15

5 years ago

5.0.0-beta.14

5 years ago

5.0.0-beta.13

5 years ago

5.0.0-beta.12

5 years ago

5.0.0-beta.10

5 years ago

5.0.0-beta.9

5 years ago

5.0.0-beta.8

5 years ago

5.0.0-beta.7

5 years ago

5.0.0-beta.6

5 years ago

5.0.0-beta.5

5 years ago