modal close attempts
Specifies the maximum number of retries for the invoked action handler specified in a call to the built-in on modal action action.
Default Value: 5 times
Default Value: 5 times
Scenario: You want to handle exceptions that your AUT may or may not throw, so you specify that action modal handler dialog is to be called in the event that an unexpected modal dialog appears during the course of execution. You'll limit to three the maximum number of times that modal handler dialog may be called in sequence without success.
- Captures screenshots of the current state when the modal dialog box unexpectedly appears, by using the capture screen built-in action.
- If the modal dialog box indeed appears, TA clicks the Continue button to bypass the dialog box. If TA is unable to find the Continue button, TA then closes that modal dialog box.Notes:If the action handler is unable to be executed at the first time, it attempts to retry 3 times.
action
on modal action modal dialog handler
 
setting value
setting modal close attempts 3
 
program
start program # AUT path
 
window control value
enter new window main textbox TestArchitect
- If the action handler is invoked
<modal close attempts>
times, but fails in all cases to remove the unwanted modal dialog box, TA returns an automation error with the following message:
The action<name of the action handler>
, specified by theon modal action
action line, was unable to dispatch the unexpected modal dialog box after<numbers of specified retries>
attempts.