> 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/scenario-creation-and-maintenance/swipe-to-element.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# 要素までスワイプ

{% hint style="warning" %}
こちらの機能は一部のお客様から順次公開予定です。ご希望の方はサポートにご連絡ください。
{% endhint %}

## 概要

要素までスワイプ機能では、安定して対象要素にたどり着くことが可能です。この機能では、指定した要素までスワイプするため、必要なスワイプ量が変わったことが原因でテストが失敗しません。

また通常のスワイプステップでは、対象要素が表示されるまでに必要なスワイプ数分のステップをレコーディングする必要がありましたが、要素の見た目を手がかりにスワイプできるため、1つのステップで表現できます。

下図の例では、通常のスワイプステップで「ひまわり」の画像が表示されるまでスワイプした場合、4回スワイプ操作 (4ステップ) が必要です。

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

一方で、「要素までスワイプ」を使うと1ステップで、且つ特徴 (sunflower) を指定してシナリオを作成することが可能です。

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

## 要素までスワイプ

### レコーディング方法

1. レコーディング時に右上に表示されている[端末操作アイコン](https://help.autify.com/nocode-mobile/using-autify-nocode-mobile/scenario-creation-and-maintenance/recording-area.md#actions) をタップし、**要素までスワイプ** をクリックします。
2. 対象要素が表示されるまで、スワイプ操作を繰り返します（上下だけでなく左右のスワイプも可能です）。
3. 対象要素全体が画面に表示されたタイミングで、対象要素をクリックします。
4. 青い四角が表示されるので、対象要素の特徴を全て網羅する範囲を選択し、検出パターンを指定します。
5. **保存** を押して保存します。 これで「要素までスワイプ」ステップとして保存されます。

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

シナリオ編集画面では、最大スワイプ回数を指定することが可能です（最大20回まで指定できます）。 シナリオのスクリーンショットはスワイプ完了後の画面を表示しています。一方で、通常のスワイプ操作ステップでは、スワイプ前のスクリーンショットを表示しています。

### テスト結果での確認

テスト結果詳細画面で、要素が表示されるまでの操作詳細を確認できます。

対象ステップのテスト結果スクリーンショットの右側にある矢印を操作することで、対象要素までの画面を確認することが可能です。

ステップが要素を見つけられなかった時、要素の検出に失敗したのか、要素が存在していなかったのかなどを確認できます。

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

また、[検出パターン](https://help.autify.com/nocode-mobile/troubleshooting/tips/tips-to-stabilize-element-selection-image-recognition.md) を更新したい場合にはクイック要素更新機能が利用可能です。 クイック要素更新のご利用方法は、[こちらの記事](https://help.autify.com/nocode-mobile/using-autify-nocode-mobile/test-execution/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-mobile/using-autify-nocode-mobile/scenario-creation-and-maintenance/swipe-to-element.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.
