> 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/faq/faq-create-scenario/faq-assertion/diff-between-should-contain-and-should-be-visible.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# What is the difference between "Page Should Contain Element" and "Element Should Be Visible"?

**"Page Should Contain Element"** succeeds if the target element is present in the HTML code.\
Whether the element is visible or not doesn't affect the result: success or failure.\
Note that it succeeds even if the element is not visible on the page, if it is invisible, or if it exists on the negative coordinate.

**"Element Should Be Visible"** succeeds if the target element is visible and exists.\
It will fail if the element is not visible, such as `display: none;`, `visibility: hidden;` or `opacity: 0;`, even if it is present in the HTML code.

Both commands can be set to a wide range of values.

For example, if you want to see a particular form after performing a particular operation, you can select the entire form and use one of the above commands to confirm the purpose of the operation.

However, this command only checks whether the element exists and whether it is visible.\
It cannot be used to check if all elements in the area are correct.

If you need to check the correctness of the displayed content, please set a separate command for each element.


---

# 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/faq/faq-create-scenario/faq-assertion/diff-between-should-contain-and-should-be-visible.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.
