> 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-recording/recording-alert-dialogs.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# アラートダイアログのレコーディング

## 概要

アラートダイアログ（Alert Dialog）とは、以下のようなエラーが発生した場合や操作が成功したことを知らせるためのダイアログで、アクションボタンをクリックすることでダイアログを閉じることができます。

* アラート
* 確認
* 入力
* ページアンロード時

このようなアラートダイアログに対する操作は、レコーディングすることが可能ですが、ダイアログの種類によっていくつか制限事項があります。

## アラート

クリックできるオプションが `OK` のみのシンプルなアラートダイアログです。

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

### 選択肢

`OK`

### ステップのアクション名

`アラートを閉じる`

### Autifyが選択する項目 <a href="#test-execution-behavior" id="test-execution-behavior"></a>

`OK`

## 確認

ユーザーに情報と2つのクリックオプションを表示するアラートダイアログです。

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

### 選択肢

* `OK`
* `キャンセル`

### ステップのアクション名

`アラートを閉じる`

### Autifyが選択する項目

`OK`

## 入力

ユーザーからの入力を求め、2つのクリックオプションを表示するアラートダイアログです。

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

### 選択肢

* `OK`
* `キャンセル`

### ステップのアクション名

`アラート内の入力フォームにテキストを入力する`

### Autifyが選択する項目

`OK` (テスト実行中に、指定されたテキストがアラートに入力されます。)

## ページアンロード時

ユーザーがページを離れようとしたときに表示されるアラートです。例えば、ウィンドウを閉じるときなどです。当記事では、「`beforeunload`アラート」と呼びます。

<img src="https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-d11cb5ea75506a48fb75883eef4a2f2e5f466e05%2Funload-dialog-ja.png?alt=media" alt="" height="200">

### 選択肢

* `このページを離れる`
* `キャンセル`

### ステップのアクション名

レコーディングされません。

### Autifyが選択する項目

デスクトップブラウザ（Chrome、Edge、Firefox、Safari）および一部の実際のモバイルデバイスは、自動化されたセッションでページがアンロードされるときに自動的にアラートを受け付けます。そのため、これらのブラウザで `beforeunload` アラートをテストすることはできず、`アラートを閉じる`ステップの対象とはなりません。

{% hint style="warning" %}
実機モバイル端末でテストする場合、アラートを自動的に受け入れるかどうかの動作は端末によって異なります。アラート操作が必要な場合は、`アラートを閉じる` ステップを追加し、デスクトップブラウザでもシナリオを実行したい場合は `このステップが失敗した時` オプションで `無視してテストを続行する` を選択してください。

<img src="https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-be611bb52069ca6d1b739d516ed050c19fb0a461%2Fimage(212).png?alt=media" alt="" data-size="original">
{% endhint %}

## 関連記事

カメラや位置情報などのアクセス権を求める場合のパーミッションダイアログについては、[こちらの記事](https://help.autify.com/nocode-web/faq/faq-create-scenario/faq-recording/can-i-allow-location-microphone-and-camera-alert-dialogs.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/faq/faq-create-scenario/faq-recording/recording-alert-dialogs.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.
