click on next popup
Click a specified button in a prompt, alert, or confirmation popup.
Name | Description | Type | Modifier |
---|---|---|---|
button | Displayed text of button to click. | String | None |
None
This action may be used within the following project items: test modules and user-defined actions.
Example - Case 1: A single popup
Scenario: You are testing a shopping cart page with a button, Delete this item, for removing an item from your cart:
- Upon clicking the button, a confirmation popup appears with the message "Do you want to delete this item?". Two buttons, OK and Cancel, are displayed.
- In the popup, the OK button is clicked.
button
click on next popup OK
 
window control
click home delete this item
Example - Case 2: A sequence of multiple popups
Scenario: You are testing a shopping cart page with a button, Delete this item, for removing an item from your cart:
- Upon clicking the button, a confirmation popup appears with the message "Do you want to delete this item?". Two buttons, OK and Cancel, are displayed.
- In the popup, the OK button is clicked.
- This triggers an alert popup with the message Item deleted, and a single OK button.
- The test clicks OK in the alert to dismiss it and proceed.
button
click on next popup OK
click on next popup OK
 
window control
click home delete this item
- Prior to using this built-in action, it is recommended that you become familiar with the different kinds of modal JavaScript popups and how to handle them properly.
- For Safari on iOS, refer to Handling JavaScript popups on Safari iOS for details.
- For Google Chrome on Android, refer to Handling JavaScript popups on Chrome Android for details.
- Because it is not possible for TestArchitect to interface with JavaScript popups in a conventional manner, this action suppresses the display of the popup to which it is targeted.Caution:
The actual appearance of a popup on your AUT's display during testing will prevent automation from proceeding. If you do indeed see a popup, probable causes are:- you specified a button that does not exist.
- your sequence of popup-handling action lines (click on next popup and enter text on next popup) did not properly account for the order in which the actual popups were invoked.
- To handle a sequence of multiple popups, use several popup-handling actions (click on next popup and enter text on next popup) in your test. These actions are stored to a FIFO (First-In, First-Out) queue and each is retrieved from the queue when required for the invocation of a new popup.
- For Safari on iOS, refer to Handling one or a series of popups for details.
- For Google Chrome on Android, refer to Handling one or a series of popups for details.
- This action supports the <ignore> modifier. If the string
<ignore>
is present as the value of the argument, or the argument contains an expression that evaluates to<ignore>
, the action is skipped during execution.