# Methods

The following methods are added to the global WebdriverIO [`browser`](/docs/api/browser.md)-object.

## Save Methods[​](#save-methods "Direct link to Save Methods")

TIP

Only use the Save Methods when you **don't** want to compare screens, but only want to have an element-/screenshot.

### `saveElement`[​](#saveelement "Direct link to saveelement")

Saves an image of an element.

#### Usage[​](#usage "Direct link to Usage")

```
await browser.saveElement(

    // element

    await $('#element-selector'),

    // tag

    'your-reference',

    // saveElementOptions

    {

        // ...

    }

);
```

#### Support[​](#support "Direct link to Support")

* Desktop Browsers
* Mobile Browsers
* Mobile Hybrid Apps
* Mobile Native Apps

#### Parameters[​](#parameters "Direct link to Parameters")

* **`element`:**

  * **Mandatory:** Yes
  * **Type:** WebdriverIO Element

* **`tag`:**

  * **Mandatory:** Yes
  * **Type:** string

* **`saveElementOptions`:**

  * **Mandatory:** No
  * **Type:** an object of options, see [Save Options](/docs/visual-testing/method-options.md#save-options)

#### Output:[​](#output "Direct link to Output:")

See the [Test Output](/docs/visual-testing/test-output.md#savescreenelementfullpagescreen) page.

### `saveScreen`[​](#savescreen "Direct link to savescreen")

Saves an image of a viewport.

#### Usage[​](#usage-1 "Direct link to Usage")

```
await browser.saveScreen(

    // tag

    'your-reference',

    // saveScreenOptions

    {

        // ...

    }

);
```

#### Support[​](#support-1 "Direct link to Support")

* Desktop Browsers
* Mobile Browsers
* Mobile Hybrid Apps
* Mobile Native Apps

#### Parameters[​](#parameters-1 "Direct link to Parameters")

* **`tag`:**

  * **Mandatory:** Yes
  * **Type:** string

* **`saveScreenOptions`:**

  * **Mandatory:** No
  * **Type:** an object of options, see [Save Options](/docs/visual-testing/method-options.md#save-options)

#### Output:[​](#output-1 "Direct link to Output:")

See the [Test Output](/docs/visual-testing/test-output.md#savescreenelementfullpagescreen) page.

### `saveFullPageScreen`[​](#savefullpagescreen "Direct link to savefullpagescreen")

#### Usage[​](#usage-2 "Direct link to Usage")

Saves an image of the complete screen.

```
await browser.saveFullPageScreen(

    // tag

    'your-reference',

    // saveFullPageScreenOptions

    {

        // ...

    }

);
```

#### Support[​](#support-2 "Direct link to Support")

* Desktop Browsers
* Mobile Browsers

#### Parameters[​](#parameters-2 "Direct link to Parameters")

* **`tag`:**

  * **Mandatory:** Yes
  * **Type:** string

* **`saveFullPageScreenOptions`:**

  * **Mandatory:** No
  * **Type:** an object of options, see [Save Options](/docs/visual-testing/method-options.md#save-options)

#### Output:[​](#output-2 "Direct link to Output:")

See the [Test Output](/docs/visual-testing/test-output.md#savescreenelementfullpagescreen) page.

### `saveTabbablePage`[​](#savetabbablepage "Direct link to savetabbablepage")

Saves an image of the complete screen with the tabbable lines and dots.

#### Usage[​](#usage-3 "Direct link to Usage")

```
await browser.saveTabbablePage(

    // tag

    'your-reference',

    // saveTabbableOptions

    {

        // ...

    }

);
```

#### Support[​](#support-3 "Direct link to Support")

* Desktop Browsers

#### Parameters[​](#parameters-3 "Direct link to Parameters")

* **`tag`:**

  * **Mandatory:** Yes
  * **Type:** string

* **`saveTabbableOptions`:**

  * **Mandatory:** No
  * **Type:** an object of options, see [Save Options](/docs/visual-testing/method-options.md#save-options)

#### Output:[​](#output-3 "Direct link to Output:")

See the [Test Output](/docs/visual-testing/test-output.md#savescreenelementfullpagescreen) page.

## Check Methods[​](#check-methods "Direct link to Check Methods")

TIP

When the `check`-methods are used for the first time you will see the below warning in the logs. This means you don't need to combine the `save`- and `check`-methods if you want to create your baseline.

```
#####################################################################################

 Baseline image not found, save the actual image manually to the baseline.

 The image can be found here:

 /Users/wswebcreation/project/.tmp/actual/desktop_chrome/examplePage-chrome-latest-1366x768.png

 If you want the module to auto save a non existing image to the baseline you

 can provide 'autoSaveBaseline: true' to the options.

#####################################################################################
```

### `checkElement`[​](#checkelement "Direct link to checkelement")

Compare an image of an element against a baseline image.

#### Usage[​](#usage-4 "Direct link to Usage")

```
await browser.checkElement(

    // element

    '#element-selector',

    // tag

    'your-reference',

    // checkElementOptions

    {

        // ...

    }

);
```

#### Support[​](#support-4 "Direct link to Support")

* Desktop Browsers
* Mobile Browsers
* Mobile Hybrid Apps
* Mobile Native Apps

#### Parameters[​](#parameters-4 "Direct link to Parameters")

* **`element`:**

  * **Mandatory:** Yes
  * **Type:** WebdriverIO Element

* **`tag`:**

  * **Mandatory:** Yes
  * **Type:** string

* **`checkElementOptions`:**

  * **Mandatory:** No
  * **Type:** an object of options, see [Compare/Check Options](/docs/visual-testing/method-options.md#compare-check-options)

#### Output:[​](#output-4 "Direct link to Output:")

See the [Test Output](/docs/visual-testing/test-output.md#checkscreenelementfullpagescreen) page.

### `checkScreen`[​](#checkscreen "Direct link to checkscreen")

Compares an image of a viewport against a baseline image.

#### Usage[​](#usage-5 "Direct link to Usage")

```
await browser.checkScreen(

    // tag

    'your-reference',

    // checkScreenOptions

    {

        // ...

    }

);
```

#### Support[​](#support-5 "Direct link to Support")

* Desktop Browsers
* Mobile Browsers
* Mobile Hybrid Apps
* Mobile Native Apps

#### Parameters[​](#parameters-5 "Direct link to Parameters")

* **`tag`:**

  * **Mandatory:** Yes
  * **Type:** string

* **`checkScreenOptions`:**

  * **Mandatory:** No
  * **Type:** an object of options, see [Compare/Check Options](/docs/visual-testing/method-options.md#compare-check-options)

#### Output:[​](#output-5 "Direct link to Output:")

See the [Test Output](/docs/visual-testing/test-output.md#checkscreenelementfullpagescreen) page.

### `checkFullPageScreen`[​](#checkfullpagescreen "Direct link to checkfullpagescreen")

Compares an image of the complete screen against a baseline image.

#### Usage[​](#usage-6 "Direct link to Usage")

```
await browser.checkFullPageScreen(

    // tag

    'your-reference',

    // checkFullPageOptions

    {

        // ...

    }

);
```

#### Support[​](#support-6 "Direct link to Support")

* Desktop Browsers
* Mobile Browsers

#### Parameters[​](#parameters-6 "Direct link to Parameters")

* **`tag`:**

  * **Mandatory:** Yes
  * **Type:** string

* **`checkFullPageOptions`:**

  * **Mandatory:** No
  * **Type:** an object of options, see [Compare/Check Options](/docs/visual-testing/method-options.md#compare-check-options)

#### Output:[​](#output-6 "Direct link to Output:")

See the [Test Output](/docs/visual-testing/test-output.md#checkscreenelementfullpagescreen) page.

### `checkTabbablePage`[​](#checktabbablepage "Direct link to checktabbablepage")

Compares an image of the complete screen with the tabbable lines and dots against a baseline image.

#### Usage[​](#usage-7 "Direct link to Usage")

```
await browser.checkTabbablePage(

    // tag

    'your-reference',

    // checkTabbableOptions

    {

        // ...

    }

);
```

#### Support[​](#support-7 "Direct link to Support")

* Desktop Browsers

#### Parameters[​](#parameters-7 "Direct link to Parameters")

* **`tag`:**

  * **Mandatory:** Yes
  * **Type:** string

* **`checkTabbableOptions`:**

  * **Mandatory:** No
  * **Type:** an object of options, see [Compare/Check Options](/docs/visual-testing/method-options.md#compare-check-options)

#### Output:[​](#output-7 "Direct link to Output:")

See the [Test Output](/docs/visual-testing/test-output.md#checkscreenelementfullpagescreen) page.
