--- title: "Recording alert dialogs" slug: "recording-alert-dialogs" description: "Learn How to Record and Handle Alert Dialogs for Effective Automation Testing in Autify. Start Your Free Trial!" updated: 2024-10-08T05:23:39Z published: 2024-10-08T05:23:39Z canonical: "help.autify.com/recording-alert-dialogs" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.autify.com/llms.txt > Use this file to discover all available pages before exploring further. # Recording alert dialogs ## Overview An alert dialog is a type of dialog that notifies the user about important information, such as when an error has occurred, or when input is required by the user to continue. Alert dialogs can be closed by clicking on an option — commonly `OK` or `Cancel`. Using Autify Recorder, you can record actions taken on alert dialogs. This document explains how the following types of alert dialog are handled by Autify Recorder: - Alert - Confirm - Prompt - Before a page is unloaded This document also contains some information about how each type of alert dialog behaves during test execution. ## Alert This is a simple alert dialog with only one option to click — `OK`. ![alert-dialog-en.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/alert-dialog-en.png?sv=2026-02-06&spr=https&st=2026-11-11T14%3A30%3A45Z&se=2026-11-11T15%3A30%3A45Z&sr=c&sp=r&sig=afjvDE6BQMf8S0lQ3iyhwc8ABBq2SBIJGGfJQM%2BlSs4%3D) ### Options `OK` ### Step Recorded by Autify `Handle Alert` ### Test execution behavior Autify will choose `OK`. ## Confirm This is an alert dialog that presents the user with some information and two options to click. ![confirm-dialog-en.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/confirm-dialog-en.png?sv=2026-02-06&spr=https&st=2026-11-11T14%3A30%3A45Z&se=2026-11-11T15%3A30%3A45Z&sr=c&sp=r&sig=afjvDE6BQMf8S0lQ3iyhwc8ABBq2SBIJGGfJQM%2BlSs4%3D) ### Options - `OK` - `Cancel` ### Step Recorded by Autify Recorder `Handle Alert` ### Test execution behavior Autify will always choose `OK`, even if `Cancel` is clicked during recording. ## Prompt This is an alert dialog that accepts input from the user and two options to click. ![prompt-dialog-en.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/prompt-dialog-en.png?sv=2026-02-06&spr=https&st=2026-11-11T14%3A30%3A45Z&se=2026-11-11T15%3A30%3A45Z&sr=c&sp=r&sig=afjvDE6BQMf8S0lQ3iyhwc8ABBq2SBIJGGfJQM%2BlSs4%3D) ### Options - `OK` - `Cancel` ### Step Recorded by Autify Recorder `Input Text Into Alert` ### Test execution behavior The given text will be input into the prompt during test execution. Autify will always choose `OK`, even if `Cancel` is clicked during recording. ## Before a page is unloaded This is an alert that is triggered when a user is about to leave the page, for example, by closing the window. In this document, this type of alert will be referred to as a `beforeunload` alert. ![unload-dialog-ja.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/unload-dialog-en.png?sv=2026-02-06&spr=https&st=2026-11-11T14%3A30%3A45Z&se=2026-11-11T15%3A30%3A45Z&sr=c&sp=r&sig=afjvDE6BQMf8S0lQ3iyhwc8ABBq2SBIJGGfJQM%2BlSs4%3D) ### Options - `Leave` - `Cancel` ### Step Recorded by Autify Recorder Autify Recorder does not record any steps for `beforeunload` alerts. ### Test execution behavior During test execution, all desktop browsers (Chrome, Edge, Firefox, and Safari) will automatically accept `beforeunload` alerts. This is native to the browsers — not a functionality of Autify. Some, not all, real mobile devices might not accept `beforeunload` alerts automatically during test execution. In such cases, please add a `Handle Alert` step to your scenario to handle the alert by clicking the `+` button in the scenario editor screen. If you want to run your scenario on desktop browsers too, set the step to `Ignore and continue` on failure. ![image.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/image%28211%29.png?sv=2026-02-06&spr=https&st=2026-11-11T14%3A30%3A45Z&se=2026-11-11T15%3A30%3A45Z&sr=c&sp=r&sig=afjvDE6BQMf8S0lQ3iyhwc8ABBq2SBIJGGfJQM%2BlSs4%3D) ## Related articles For permission dialogs that request access to the camera, location, etc., please refer to the following article: [Can I allow location, microphone, and camera alert dialogs when recording?](/v1/docs/can-i-allow-location-microphone-and-camera-alert-dialogs)