> 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-mobile/using-autify-nocode-mobile/test-execution/quick-element-update.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# クイック要素更新

## クイック要素更新とは <a href="#what-is-quick-element-update" id="what-is-quick-element-update"></a>

**クイック要素更新** は、テスト結果で意図した要素がタップされていないステップがある場合もしくは要素までスワイプステップで対象要素を見つけられていない場合、テスト結果画面から簡単に要素を再選択し、次のテスト実行時に意図した通りにタップやスワイプされるようにすることができる機能です。

クイック要素更新の魅力は、対象ステップを更新するために、Autifyレコーダーを起動して直前のステップまでを全て再生する必要がなく、再レコーディングせずに瞬時に更新が可能な点です。 またクイック要素更新は、タップ操作および要素までスワイプ操作で利用可能です。

クイック要素更新は、ステップ自体が成功したか失敗したかに関係なく利用できるため、様々な場面で役立ちます。

## クイック要素更新を使用する

テスト結果詳細画面で、意図した対象要素が見つけられていないステップを開き、画面右下 **要素を更新する** をクリックすることでクイック要素更新を利用できます。

### 1. 画像認識から更新する

スクリーンショット画面から更新するとても簡単な方法です。

テスト結果スクリーンショット上で、選択したい要素をクリックし、**要素の更新** をクリックします。 画像認識による要素探索は、レコーディング時にタップもしくは要素までスワイプ操作で指定された位置周辺の見た目を元に要素を探します。そのため、要素やその要素周辺の見た目が特徴的な領域を選択すると安定して要素をタップできるようになります。

[画像認識に関するTipsの記事](https://help.autify.com/nocode-mobile/troubleshooting/tips/tips-to-stabilize-element-selection-image-recognition.md)もご参照ください。

### 2. XPathを指定 (更新) する <a href="#specify-update-the-xpath" id="specify-update-the-xpath"></a>

要素の見た目が頻繁に変わるなど画像認識では安定しない場合、XPathの更新が有効な場合があります。これはページソースから取得した要素のXPathを指定するオプションです。 画面右下にある **要素を更新する** をクリックします。 そして、画面の上にあるローケータタイプから **Page Source** を選択します。

![](https://1076629499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fngfbmyfc37v4emfzEMM7%2Fuploads%2Fgit-blob-55b5baef65239cecc64e2101e22141716d3131de%2Fquick_element_update_4_jp\(1\).png?alt=media)

実際の画面 (左側) とPage Source画面 (右側) が表示されますので、画面下部にある項目がXPathになっていることを確認します。 XPathとなっていない場合は、プルダウンメニューから選択してください。

![](https://1076629499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fngfbmyfc37v4emfzEMM7%2Fuploads%2Fgit-blob-59ba0aad63f8fe2c0e0e8197646ad6560efd8381%2Fquick_element_update_9_jp.png?alt=media)

例えば以下の「WaterMelon」要素を指定する図ですと、Page Source画面から対象としたい要素を選択すると左側に表示されているスクリーンショットで該当箇所がハイライトされます。指定ができたら、**要素の更新** をクリックします。

![](https://1076629499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fngfbmyfc37v4emfzEMM7%2Fuploads%2Fgit-blob-1a7c9c4964a83b40990d1b48d6e3465e1985bc07%2Fquick_element_update_5_jp\(1\).png?alt=media)

また、以下のようにXPathはご自身で直接指定することも可能です。対象要素を選択するために必要な情報を取捨選択することで自動生成されたXPathよりも安定性を向上させることができます。詳しくは[XPathに関するTipsの記事](https://help.autify.com/nocode-mobile/troubleshooting/tips/tips-to-stabilize-element-selection-xpath-and-accessibility-id.md)をご参照ください。

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

### 3. Accessibility IDを指定 (更新) する

Accessibility IDとは、テスト自動化のため要素に指定される固有のIDです。 他の手法 (画像認識やXPathの更新) でテストを安定させることができない場合、アプリケーションの実装でAccessibility IDを追加し、テストに利用することを設定をお勧めします。 詳しくは、[Accessibility IDに関するTipsの記事](https://help.autify.com/nocode-mobile/troubleshooting/tips/tips-to-stabilize-element-selection-xpath-and-accessibility-id.md)をご参照ください。

XPath同様にテスト結果画面の右上「要素の更新 (XPath)」をクリックし、プルダウンメニューから「Accessibility ID」選択してください。 選択したい要素のAccessibility IDを入力し、**要素の更新** をクリックします。

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

## クイック要素更新を使用後

いずれの方法で更新した後も、画面左上に「ステップを更新しました。シナリオを再実行」と表示されます。もし、このタイミングで再実行をされたい場合は、**シナリオを再実行** をクリックしていただくと、更新した内容で再実行が可能です。

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

また、画面下に次のいずれかが表示されます。

* 「ロケータ：画像認識」
* 「ロケータ：XPath」、
* 「ロケータ：Accessibility ID」

具体的なXPathやAccessibility IDの詳細はこの画面からは確認できません。 設定した内容を確認したい場合は、更新画面を再度開いてご確認ください。

![](https://1076629499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fngfbmyfc37v4emfzEMM7%2Fuploads%2Fgit-blob-084ae7d9147d8e095a6da7b71aed251cba6e4d3a%2Fquick_element_update_11.png?alt=media)

また更新後、テスト結果画面では、以下のように「updated」と表示され、対象ステップの要素が更新されたことを確認できます。

![](https://1076629499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fngfbmyfc37v4emfzEMM7%2Fuploads%2Fgit-blob-b05aa6fa746f8773144bdf743bc689d1de0805c8%2Fquick_element_update_6\(1\).png?alt=media)

## 注意

* クイック要素更新で要素を更新すると、シナリオの要素とスクリーンショットが更新されます。
* クイック要素更新をしてからシナリオを複製した場合、更新内容は複製先のシナリオにも引き継がれます。シナリオを複製してからクイック要素更新をした場合、複製先のシナリオには引き継がれません。
* 「要素を更新する」は元に戻せません。最初に選択した要素と同じものを再び選択したい場合は、もう一度「要素を更新する」して同じ要素を再選択してください。
* ステップグループ内のステップの要素を更新した場合、そのステップグループを使用するすべてのシナリオに影響があります。


---

# 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-mobile/using-autify-nocode-mobile/test-execution/quick-element-update.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.
