> 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/common-errors/element-not-found.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# Element not found

If Autify cannot find a target element during a test run, you will see the following message in the test result:

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

There are two main causes of the "Element not Found" error. First, check the screenshot of the failed step to see which of the following applies:

* The target element does not exist on the page.
* The target element exists on the page, but was not found.

## If the target element does not exist on the page

In this case, you need to determine why the target element was not present when the failed step was executed. Possible causes are listed below.

### An unintended action was performed in a previous step

Check the steps before the failed step and see if the intended screen transition occurred. If not, it may be because Autify clicked the wrong button or a validation error occurred during form input. In this case, please fix the previous step in question.

For example, let's say you enter an email address on the trial request page, click the **Request Trial** button, and want to validate the message that appears on the thank-you page. However, if a valid email address is not entered on the trial request page, a validation error appears, so the transition to the thank you page that *should* occur when the button is clicked does not occur.

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

As a result, the assertion step (Step 5 in the screenshot below) failed with an "element not found" error because it didn't transition to the intended page. The cause of the error is Step 3, where the wrong email address is entered. To fix the error, we need to make sure that the correct email address is entered in Step 3.

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

### No hover step

If Autify couldn't find an element that appears on mouseover, adding a [hover step](https://help.autify.com/nocode-web/en/autify-university/foundation/creating-a-scenario/hover-step.md) may solve the problem. For more information, see [**Actions on elements that appear on mouseover results in Fail or Review Needed**](https://help.autify.com/nocode-web/en/when-the-test-doesnt-work/test-issues/troubuleshoot-hover-step-need-review.md).

### Timezone

The timezone of Autify's test execution environment is available for [UTC or JST](https://help.autify.com/nocode-web/en/faq/faq-test-execution/faq-test-execution-env/can-i-specify-the-time-zone-of.md) depending on your workspace settings. Please check if the test involves a date/time. For example, let's say your test checks whether a specific search result appears when the creation date/time is set as the search criteria. If the result appears when the test is manually executed in a local environment but not on Autify, the error may be caused by the timezone difference between the local environment and Autify's test execution environment.

### The page was loading

If Autify searched for the element while the page was still loading, add a [sleep step](https://help.autify.com/nocode-web/en/autify-university/foundation/creating-a-scenario/sleep-step.md) before the failed step to wait for the the page to finish loading.

{% hint style="info" %}
**Autify Element Search**

If the target element is not present on the page, Autify will continue searching for a certain amount of time. Therefore, there is no need to use a sleep step if the page loads within that time.
{% endhint %}

### Other tests had an effect

For example, let's say you have the following three scenarios:

1. Create an item
2. Search for the item on the search page and confirm that the item exists
3. Delete the item

For all of these scenarios to pass, the order in which they are executed is critical. If scenario 3 is executed before scenario 2, scenario 2 will fail because Autify won't be able to find the target element.

The order in which the scenarios are executed is affected by a combination of whether Parallel Test Execution is enabled or disabled in Workspace settings, how parallels are executed, and whether or not the Data feature is used. If you suspect that the order of execution is causing the error, please see [this article](https://help.autify.com/nocode-web/en/autify-university/advanced/test-execution-order/scope-of-application-of-parallel-or-sequential-execution.md).

## If the target element exists on the page but was not found

After reviewing the screenshot, you may find that the element does exist on the page. In this case, the cause of the "Element not found" message may be one of the following.

### The page was modified

Even if the characteristics of the element are not exactly the same as in the previous test run due to page changes, Autify will follow the element with the highest match. However, depending on the nature of the changes, it may not follow the correct element.

Please check the Diff tab on the test result page. If there is a difference, the page change may be the cause of the error. In this case, the test may pass if you update the element information in one of the following ways:

* Update the element using the [Quick Element Update](https://help.autify.com/nocode-web/en/autify-university/foundation/test-results/quick-element-update.md) feature.
* Re-record the target step by using the [Record Here](https://help.autify.com/nocode-web/en/faq/faq-create-scenario/faq-recording/what-can-i-do-with-record-here.md) feature.

### Little information was available to identify the element

If the target element cannot be found even though there are few or no differences between pages, it may be because there wasn't enough information to identify the element or because there is a similar element. In this case, an effective solution is to use a [locator](https://help.autify.com/nocode-web/en/autify-university/advanced/locator-feature/add-a-locator.md) to specify the correct element.

### The element's text is dynamic

One of the characteristics that Autify uses when searching for an element is its text. Therefore, if the text of the target element is different than when it was recorded, Autify may not be able to find it. If this is the case, please see [How to grab an element with dynamic data](https://help.autify.com/nocode-web/en/when-the-test-doesnt-work/test-issues/how-to-grab-an-element-with-dynamic-data.md).

### The CSS selector / XPath set in the locator was wrong

This error occurs when the CSS selector / XPath set in the locator cannot find the element. Please read [this article](https://help.autify.com/nocode-web/en/autify-university/advanced/locator-feature/how-to-get-css-selectors.md#how-to-validate-css-selector-xpath) and check if the element can be retrieved with the CSS selector / XPath you've set.

## If you are still having trouble...

Please contact us. We will work with you to resolve the issue.


---

# 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/common-errors/element-not-found.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.
