jest-environment-wdio

0.2.2 • Public • Published

jest-environment-wdio

version MIT License

Run WDIO Tests using Jest

** NOTE ** Compatible with WDIO v5 ONLY!

Installation

NPM:

npm install jest-environment-wdio webdriverio --save-dev

Yarn:

yarn add jest-environment-wdio webdriverio --dev

Configuration

In the package.json update the jest configuration section

"jest"{
  "testEnvironment": "jest-environment-wdio",
  "testEnvironmentOptions": {
      "wdio": {
          "capabilities":{
              "browserName": "firefox"
          }
          // any wdio configuration options
      }
  }
}

testEnvironmentOptions Default Options. Does support all WDIO Configuraiton Options

{
    host: '127.0.0.1',
    port: 4444,
    protocol: 'http',
    waitForTimeout: '10000',
    connectionRetryTimeout: '90000',
    connectionRetryCount: 3,
    logLevel: 'debug',
    coloredLogs: true,
    capabilities: {
        browserName: 'chrome'
    }
}

API

global.browser

Access to the WDIO Browser Object

global.$

Alias for findElement

global.$$

Alias for findElements

From here the WDIO v5 API documentation takes over.

Package Sidebar

Install

npm i jest-environment-wdio

Weekly Downloads

2

Version

0.2.2

License

MIT

Unpacked Size

171 kB

Total Files

7

Last publish

Collaborators

  • fijijavis