- WDIO 6
- Mocha
- TypeScript
- Typed Config
- ESLint
- VSCode Integration
- Multiple Configurations (Devtools, Chromedriver, Sauce Labs)
- Cross Platform Example Tests
- Page Object Model
- Node version 8 or higher
- (for local execution) Latest Chrome Stable
- (for cloud execution) Sauce Labs Account
- clone the git repo:
git clone https://github.com/pako88/wdio-mocha-typescript.git
- install the dependencies:
npm install
- (for cloud execution) set the following environment variables with your sauce labs credentials
- SAUCE_USERNAME
- SAUCE_ACCESS_KEY
You can either run the tests with the integrated Visual Studio Code Debug Scripts, or you can run them with one of the following terminal commands.
npm run test:chromedriver
npm run test:devtools
npm run test:sauce
TypeScript is transpiled on the fly with ts-node, you don't have to execute the tsc command.
To enable this feature and to have typed configurations, js-wrappers are implemented for each configuration.
Take a look in the config folder for the technical implementation.
If you want to debug your tests with breakpoints in VSCode, you have to install the nightly version of the JavaScript Debugger
- actions.ts doesn't work with devtools yet
- actions.ts doesn't work with safari and ie
- The uploadFile command is not available in msedge