jest-environment-wdio
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":
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.