WebDriverIO
Basic Info
Running scripts
================
npx wdio run ./wdio.conf.js
Running in different browsers
==============================
// services: ['chromedriver']
services: ['selenium-standalone'],
------
browserName: 'chrome',
// browserName: 'firefox',
// browserName: 'MicrosoftEdge',
Alure Reporting with Mocha framework
=====================================
Step1:
To create allure report xml
install @wdio/allure-reporter --save-dev
npm install @wdio/allure-reporter@7.0.7
Step2:
Add the below in wdio.conf.js
reporters: [['allure', {
outputDir: 'allure-results',
disableWebdriverStepsReporting: true,
disableWebdriverScreenshotsReporting: false,
}]],
Step3:
after allure reports xml generated, to display them in html format
npm install -g allure-commandline --save-dev
Step4:
to open html reports
allure generate allure-results && allure open
Note:
**some time the version may cuase issue in generating allure-results folder
choose valid version
**power shell may not open the above. so try to open it in bash shell/windows command prompt
package.json working dependencies
=================================
devDependencies": {
"@wdio/allure-reporter": "^7.0.7",
"@wdio/cli": "^7.27.0",
"@wdio/local-runner": "^7.27.0",
"@wdio/mocha-framework": "^7.26.0",
"@wdio/selenium-standalone-service": "^7.7.4",
"@wdio/spec-reporter": "^7.26.0",
"chai": "^4.3.7",
"chromedriver": "^107.0.3",
"wdio-chromedriver-service": "^8.0.0"
}
Comments