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

You must have read and been familiar with recording a Web UI test. See Recording a Web UI test.

About this task

You can select the Validate Text checkbox in the test step of alert, confirm, or prompt dialogs of a recorded Web UI test script. After you select this checkbox and play back the test script, the text message in the dialog is validated before the user action. The results are captured in the unified report.

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, Rational® Functional Tester 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

  1. Record a web application with an alert, confirm, or prompt dialog.
  2. 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.
  3. Select the original test step.
  4. Enter the text to be verified in the Text box in the User Action Details pane.
  5. 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
    This statement ensures that the text message is validated before the user interface action is played back in the dialog.
  6. 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.
  7. 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 Rational® Functional Tester waits for data. If no data is received for the specified amount of time, the session is disconnected.
  8. 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.
  9. Save the test.

What to do next

You can run the test and verify the results in the unified report. See Running a Web UI test and Unified reports for Web UI, mobile, and Windows tests.