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"
Click on the “Root application" to select the interface type
A new menu will appear with the following possibilities:
- 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
There are three actions possible on a dialog box
Confirm the dialog box
From the root application, select “Dialog box” to show its options
Select the validation type you need for the dialog box:
A dialog box that needs to be accepted or dismissed
It is also possible to simply use the click action on a dialog box if only one button appears.
An “Ok” button that is used to make the dialog box disappear
On each of the proposed actions it is possible to perform a property action which will enter the information entered in the dialog box.
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,
As a value in your property action.