> 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/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).

# 「ページに指定の要素が存在することを確認する」と「対象が表示されていることを確認する」の違いはなんですか？

**ページに指定の要素が存在することを確認する** は対象の要素が見える状態かどうかは成否判定に影響せず 、 **HTMLのコード上に存在していれば成功** します。人が見てページ上に表示されていなくても、 不可視状態であったりマイナス座標上に存在している場合は成功となる点に注意してください。

**対象が表示されていることを確認する** は対象の要素が **見える状態で存在していれば成功** します。 HTMLのコード上に存在していても`display: none;` や`visibility: hidden;`、`opacity: 0;` など見えない状態の場合は失敗となります。

いずれのコマンドも広い範囲に対して設定することも可能です。

例えば **特定の操作を行ったあとに特定のフォームが表示される** という場合には、フォーム全体を選択し、上記のいずれかのコマンドを使用すると、目的に沿った確認を行うことができます。

ただし、あくまで「要素が存在するか」「要素が見える状態か」を確認するコマンドであり、「その範囲に含まれる全ての要素が正しいかを確認する」という使い方はできません。

表示内容の正しさの確認が必要な場合は各要素に対して個別にコマンドを設定してください。


---

# 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/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.
