Add visual regression screenshot comparison to a WebdriverIO test suite with @wdio/visual-service

domain: browser-automation · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install `@wdio/visual-service` and add `["visual", {...}]` to the `services` array in wdio.conf.js
  2. Configure `baselineFolder`, `screenshotPath`, and `formatImageName` (e.g. `"{tag}-{logName}-{width}x{height}"`) so comparisons are reproducible across runs
  3. Set `savePerInstance: true` to keep baseline/actual images separated by browser/device instance when running matrixed capabilities
  4. Enable `isHybridApp: true` when comparing screens inside an Appium-driven hybrid (WebView) app rather than a pure desktop/mobile browser
  5. Run the suite once with `--update-visual-baseline` to (re)generate baseline images after an intentional UI change
  6. Note comparisons use the ResembleJS engine under the hood; as of v5 the service is pure JavaScript (Jimp-based) with no native Cairo/node-canvas dependency to compile

Known gotchas

Related routes

Choose between pixel-diff screenshot comparison and DOM/structural snapshot testing for catching visual regressions
playwright.dev · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans