How to automate a dialog box validation
It will happen often that you will need to validate a dialog box on supported web browsers in order to confirm or cancel an action.
However, it is impossible to capture a dialog box with the capture tool.
To automate the validation with Agilitest, you will need to select the dialog box from the root application available in an action.
When you create an action without inteface element, it will show the root application.
Click on the “Mouse” action in the actions menu

Then, select "Mouse click"
.png)
Click on the “Root application" to select the interface type
.png)
A new menu will appear with the following possibilities:
.png)
- Add an interface element
- Modify the system element
- Manage a dialog box
- Screen record
To know more on the other elements types, you can consult ou documentation about Editing actions.
To automate a dialog box, click on the “Dialog box” button
.png)
There are three actions possible on a dialog box
Confirm the dialog box
From the root application, select “Dialog box” to show its options
.png)
Select the validation type you need for the dialog box:
- Accept
- Dismiss
.png)
Example :
A dialog box that needs to be accepted or dismissed
.png)
Click action
It is also possible to simply use the click action on a dialog box if only one button appears.
.png)
Example :
An “Ok” button that is used to make the dialog box disappear
.png)
Property action
On each of the proposed actions it is possible to perform a property action which will enter the information entered in the dialog box.
Example :
To do that, click on the “Property” action situated in the action menu

Then, select “Dialog box” from the root application.

This will return the text shown in the dialog box,
.png)
As a value in your property action.
.png)