# Wopee.io Visual Testing for WebdriverIO

Catch visual regressions in your [WebdriverIO](https://webdriver.io/) tests with AI-powered autonomous test maintenance by [Wopee.io](https://wopee.io).

[![npm version](https://img.shields.io/npm/v/@wopee-io/wopee.wdio)](https://www.npmjs.com/package/@wopee-io/wopee.wdio)
[![license](https://img.shields.io/npm/l/@wopee-io/wopee.wdio)](https://www.npmjs.com/package/@wopee-io/wopee.wdio)

## Requirements

- Node.js 20 or newer
- WebdriverIO 8 or 9, installed in your project

`webdriverio` is a peer dependency, so the plugin uses the exact version your test
suite already runs rather than pulling a second copy of it.

## Installation

```bash
npm install @wopee-io/wopee.wdio
```

If your project does not already depend on WebdriverIO directly:

```bash
npm install @wopee-io/wopee.wdio webdriverio
```

## Quick Start

Add the Wopee service to your WebdriverIO config:

```js
// wdio.conf.js
export const config = {
  services: [
    [
      '@wopee-io/wopee.wdio',
      {
        apiUrl: 'https://api.wopee.io',
        apiKey: process.env.WOPEE_API_KEY,
        projectUuid: process.env.WOPEE_PROJECT_UUID,
      },
    ],
  ],
};
```

Take visual snapshots in your tests:

```js
describe('Visual Testing', () => {
  it('should match the homepage', async () => {
    await browser.url('https://example.com');
    await browser.wopeeTrack('homepage');
  });
});
```

## Documentation

- [Configuration](https://docs.wopee.io/webdriverio-visual-testing/) -- full setup guide and configuration options
- [Commands](docs/commands.md) -- available WebdriverIO commands
- [Mobile Native](docs/mobile_native.md) -- mobile app testing support

## Links

- [Documentation](https://docs.wopee.io/webdriverio-visual-testing/)
- [Wopee.io Platform](https://cmd.wopee.io)
- [Wopee.io Website](https://wopee.io)
