Recording alert dialogs
  • 08 Oct 2024
  • 2 Minutes to read
  • Contributors
  • Dark
    Light

Recording alert dialogs

  • Dark
    Light

Article summary

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

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

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

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

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

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?


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.