> For the complete documentation index, see [llms.txt](https://help.autify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.autify.com/nocode-web/en/when-the-test-doesnt-work/test-issues/causes-and-solutions-for-vrt-failures.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# Causes and solutions for failures in the Element should look the same step

## Overview

In Autify's "Element should look the same" step (hereafter, the VRT step), image comparison is used to determine if an element's appearance on the screen matches its past state. If this VRT step fails, there are several possible causes.

***

## Main causes and solutions

### 1. Impact of Chrome version upgrades

**Cause** When the Chrome browser version has changed compared to the previous execution environment and the test fails with the error “The target element had visual changes” the impact of the Chrome version update may be a factor. The Chrome browser used in Autify's execution environment is regularly updated to the latest version. This can cause minor visual changes that may affect the VRT's matching judgment, such as:

* Changes in the shape of scrollbars (e.g., from square to rounded).
* Slight shifts in element margins or alignment.
* Minor adjustments to system fonts or changes in the rendering algorithm.

> 💡 Example: A test passes in the morning but fails in the evening on the same day. → This could be because a Chrome version update caused a discrepancy in the VRT comparison result.

**Solution**

* **Execute "Accept changes"** If the difference in the VRT step is intentional or due to a specification change, please execute [`Accept changes`](https://help.autify.com/nocode-web/en/autify-university/advanced/visual-testing/visual-regression-testing-for-elements.md#accept-changes) for the relevant step. This action will update the baseline image, and subsequent tests will be judged based on the new appearance.

  ![](https://1964297753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVdZPTgwISYb3LhjgKnw6%2Fuploads%2Fgit-blob-c27fd1a75f128878061ecaa4a15f6b24c3b23512%2Fimage1.png?alt=media)

**Chrome update frequency and points to note**

* Chrome is typically updated once or twice a month.
* These updates can sometimes include slight changes to the UI rendering specifications, which may cause VRT steps to fail.
* Please note that not every update will cause an impact; it often depends on the specific CSS and structure of the elements.

***

### 2. The target element is outside the viewport

**Cause** If the step fails with the error "The target element was not displayed," the element is likely not within the viewport. This is highly probable if this error occurs even during the test's initial run when no baseline image has been captured, as it indicates Autify cannot correctly recognize the element because it's off-screen.

![](https://1964297753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVdZPTgwISYb3LhjgKnw6%2Fuploads%2Fgit-blob-d5152f9365dd45861772ab162afe961ddc15ea4c%2FScreenshot%202025-08-28%20at%2018.14.17.png?alt=media)

**Solutions**

* **① Specify and assert elements in smaller units.** Instead of selecting a large area at once, break the element down and create multiple assertion steps. This helps ensure each smaller element fits within the viewport.
* **② Temporarily reduce the screen size to fit the target element into the viewport.** Add the following JS step before the VRT step to temporarily zoom out, ensuring the entire target element fits within the viewport.

```
document.body.style.zoom = "60%";
```

***

## Other recommended solutions

### Separate VRT steps into a different scenario

For screens that undergo frequent visual changes, we recommend separating your VRT from your standard E2E tests. This allows you to manage functional checks and visual checks independently.

* **E2E Test Scenario:** Verifies functional flows and processes.
* **VRT-Only Scenario:** Focuses specifically on visual verification.

### Adjust the threshold \[Consultation required]

By adjusting the [`Visual regression diff threshold`](https://help.autify.com/nocode-web/en/autify-university/advanced/visual-testing/visual-regression-testing-for-elements.md#visual-regression-diff-threshold), you can sometimes ignore minor visual differences. However, please be very cautious when adjusting the threshold, as setting it too high may cause you to overlook actual bugs.

![](https://1964297753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVdZPTgwISYb3LhjgKnw6%2Fuploads%2Fgit-blob-0583eb4c049279def846fa795c35f7eb46af1957%2Fimage2.png?alt=media)

***

## Notes

### What we currently do not support

* **Controlling the image comparison target via locator specification (e.g., specifying only a portion of an image).** → VRT compares the entire image and cannot be controlled by HTML attributes.
* **Fixing the Chrome version for each execution environment.** → Autify does not offer a feature to lock the browser version.

### Internal Error Occurrences

As a known issue, tests may occasionally fail with an Internal Error due to temporary communication errors within Autify's internal system. In most cases, this issue can be resolved by rerunning the test. If the failure persists or occurs frequently, please contact us.

***

### If you need help

If you are unsure about the cause of a VRT step failure or how to resolve it, please contact our support team with the URL of your test result. We will review your test result and provide you with the most appropriate solution.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.autify.com/nocode-web/en/when-the-test-doesnt-work/test-issues/causes-and-solutions-for-vrt-failures.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
