> 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/when-the-test-doesnt-work/test-issues/unintended-point-is-clicked.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# 要素内の意図しない箇所がクリックされる

## Autifyのクリック

Autifyはレコーディング時に要素のどこをクリックしても(例えば要素の端)、テスト実行時は要素の中央をクリックします。これにより、テスト実行時に意図しない動きをしてしまい、テストが失敗することがあります。

## テストが失敗するケース

例として、チェックボックスをチェックし、チェックがされているかを検証するシナリオを紹介します。

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

このチェックボックスをチェックするには、チェックボックス(input要素)を直接クリックするか、全体を囲むdiv要素内のどこかをクリックする2つの方法があります。

![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-3e93d17667a97c40b961bcec993f1bdbeb3bf62c%2Fcheckbox-input-div.png?alt=media)

レコーディングではdiv要素内にある"This"のあたりをクリックしてチェックをしています。そのため、スクリーンショットのフォーカスはdiv要素全体に当たっています。このdiv要素の中央を見ると、ちょうどAutifyのWebサイトへのリンクになっていて、ここをクリックするとページ遷移が発生します。

![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-1a42a881a5dbb1905118c5d2253dd34e2d7537b6%2Ffocus-div.png?alt=media)

テストを実行すると、ステップ2のクリックがリンクのクリックになってしまい、ステップ3でページが遷移しています。そのため、チェックボックスが見つからずにテストが失敗しました。

![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-3ab28eedbeb7be5688f69c3f359355ad5bb5e72e%2Fja-test-fail.png?alt=media)

## 対応方法

上記のケースでは、div要素ではなくinput要素をクリックすることで、テストが成功します。 要素の中央がクリックされたことでテストが失敗した場合は、意図したクリックとなるように、再レコーディングや[クイック要素更新](https://help.autify.com/nocode-web/autify-university/foundation/test-results/quick-element-update.md)で要素のアップデートを行ってください。


---

# 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/when-the-test-doesnt-work/test-issues/unintended-point-is-clicked.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.
