While working in browsers, errors may occur, leading to the appearance of dialog boxes during browser interactions. These windows are not considered as elements in the page code.

Such browser errors can be handled using the «Dialog Boxes» subgroup under the «Browsers» group.

Let’s consider an example of working with dialog boxes.

In this case, the robot accesses the debtors registry website, enters information into a field that does not match the expected format, and then a warning is displayed.

To read information from the error window and close it, use the actions «Get dialog box text» and «Accept dialog box».

When configuring the «Get Dialog Box Text» action, fill in the «Context» field. As a result, a variable of string type will be obtained.

The «Accept dialog box» action is suitable for windows with buttons such as «Yes,» and the robot should press it. In this case, the alternative to the «Accept dialog box» action can be the «Dismiss dialog box» action.

After running the robot, the logs will display the text of the «Get dialog box text» action: