> For the complete documentation index, see [llms.txt](https://docs.avoautomation.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avoautomation.com/avo-assure/support-resources/knowledge-base-articles/design-studio/test-case/choosing-the-correct-element-verification-action.md).

# Choosing the Correct Element Verification Action

**Summary**: This article explains the differences between the verifyVisible, verifyHidden, verifyExists, and verifyDoesNotExists actions in Avo Assure. It also provides an example of verifying an element that appears on a web page after a user performs an action.

### **Error Behavior**

Using an incorrect element verification action can cause a Test step to fail even when the element is present on the page.

The four actions check different element states:

* [**verifyVisible**](https://docs.avoautomation.com/avo-assure/actions/web/common-web-operations/verifyvisible.md): Verifies that the element exists in the page and is displayed on the screen.
* [**verifyHidden**](https://docs.avoautomation.com/avo-assure/actions/web/common-web-operations/verifyhidden.md): Verifies that the element exists in the page but is not displayed.
* [**verifyExists**](https://docs.avoautomation.com/avo-assure/actions/web/common-web-operations/verifyexists.md): Verifies that the element exists in the page, regardless of whether it is visible or hidden.
* [**verifyDoesNotExists**](https://docs.avoautomation.com/avo-assure/actions/web/common-web-operations/verifydoesnotexists.md): Verifies that the element does not exist in the page.

### **Possible Reasons**

This issue may occur due to one or more of the following reasons:

* The Test Case uses an incorrect verification action for the element's current state.
* The element exists in the page but is hidden, and the Test Case uses **verifyDoesNotExists** instead of **verifyHidden**.
* The element is not yet available in the page when the verification step executes.
* The Test Case does not wait for a dynamically displayed element before verifying its visibility.

### **Resolution/Solution**

To verify an element correctly, identify whether it exists in the page and whether it is visible.

1\. Inspect the element in the browser:

* Right-click the web page and select Inspect.
* Search for the required element in the page code.
* If the element is present, determine whether it is displayed or hidden.

2\. Use the appropriate verification actions.

3\. Configure the Test steps according to the expected element behavior.

#### **Example: Verifying a Section That Appears After an Action**

Consider a web application where the Address section appears after a user enters a ZIP code and selects Submit.

Configure the following Test steps:

<table><thead><tr><th width="56.16668701171875">Step</th><th width="178">Elements</th><th width="206.1666259765625">Actions</th><th width="105.3333740234375">Input Value</th><th>Output Value</th></tr></thead><tbody><tr><td>1 </td><td>Address section </td><td>verifyHidden </td><td>N/A </td><td>N/A </td></tr><tr><td>2 </td><td>ZIP field </td><td>Set Text </td><td>560001 </td><td>N/A </td></tr><tr><td>3 </td><td>Submit </td><td>Click on Element </td><td>N/A </td><td>N/A </td></tr><tr><td>4 </td><td>Address section </td><td>Wait for Element to be Visible </td><td>N/A </td><td>N/A </td></tr><tr><td>5 </td><td>Address section </td><td>verifyVisible </td><td>N/A </td><td> </td></tr></tbody></table>

4\. Verify the execution result:

* Step 1 confirms that the Address section exists but is hidden.
* Steps 2 and 3 enter the ZIP code and submit the form.
* Step 4 waits for the Address section to appear.
* Step 5 verifies that the section is visible. The result is stored in the dynamic variable.
  * **True**: The Address section is visible.
  * **False**: The Address section is not visible or the verification fails.

### **Additional Notes**

* If the Address section does not exist in the page code before the ZIP code is submitted, use **verifyDoesNotExists** in Step 1 instead of **verifyHidden**.
* Use **verifyExists** when you only need to confirm that an element is present, without checking its visibility.&#x20;
* Use **verifyVisible** or **verifyHidden** when the element's display state matters.


---

# 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://docs.avoautomation.com/avo-assure/support-resources/knowledge-base-articles/design-studio/test-case/choosing-the-correct-element-verification-action.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.
