Visual regression tool for webdriver.io
npm install wdio-visual-regression

bash
npm install --save-dev wdio-visual-regression
`
2. Import VisualRegression class and add it to service option in your webdriverio config file
`js
const { VisualRegression } = require('wdio-visual-regression');exports.config = {
// other configuration
services: [
[VisualRegression, {/ options /}]
]
}
`
Note: You can find out all available options here3. Use available commands:
`ts
browser.matchElement(name: string, element: WebdriverIO.Element): Promise
browser.matchViewport(name: string): Promise
`Or create your own custom matcher for comparing anything that you need. See how to do it here
Also, you can take a look at example usage here
Getting Started
Follow to commands below for start dev environment`bash
git clone git@github.com:ennjin/wdio-visual-regression.git
cd wdio-visual-regression
npm ci
`
For start development
`bash
npm run start
`
For production build
`bash
npm run build
`Running the tests
For running the tests type command
`bash
npm run e2e
``