Creating verification points for alert, confirm, or prompt dialogs
You can create verification points for alert, confirm, or prompt dialogs in a recorded Web UI test by validating text messages in the dialogs. The text messages are validated during the playback. You can also choose to skip the step for dialogs and continue to the next step if such dialogs do not exist.
Before you begin
About this task
You can also select the Skip the step if the control is not found checkbox for the test step of alert, confirm, or prompt dialogs in a recorded Web UI test script. After you select this checkbox and play back the test script, Test UI checks for the dialog and marks the step as Pass even if the dialog does not exist. By skipping the step for dialogs, you can manage the optional dialogs that might or might not display depending on user actions. You can view the unified report to read the message that is logged regarding the presence of the dialog.
Procedure
- Record a web application with an alert, confirm, or prompt dialog.
- Create a duplicate of the required test step such as Accept the Alert, Accept the Confirm, or Enter text and Accept the Prompt in the Test Contents pane in the generated test.
- Select the original test step.
- Enter the text to be verified in the Text box in the User Action Details pane.
-
Select the Validate Text checkbox.
Depending on the selected dialog type, the test step is modified to display one of the following statements:
- Verify that Alert text contains dialog text
- Verify that Confirm text contains dialog text
- Verify that Prompt text contains dialog text
- Optional:
Enter the Think time value in milliseconds.
Think time is a statistical emulation of the amount of time that actual users spend to read or think before they perform an action.
- Optional:
Select the Time out (seconds) checkbox, and then enter a
value for the timeout for the selected step.
Note: The timeout value specifies the amount of time, in seconds, that the Test UI waits for data. If no data is received for the specified amount of time, the session is disconnected.
- Optional: Select the Skip the step if the control is not found checkbox to mark the step as Pass even if the dialog does not exist.
- Save the test.