"ALERT" Command

Description: This command is used to accept or cancel a JavaScript popup.
Usage Scenario: Supposed we have a web page that displays a JavaScript popup with OK and Cancel buttons such as the below and we want to click OK/ Cancel on this popup.

Procedure: Define steps that lead up to the point the JavaScript popup appears and add a step with Alert command and select OK/Cancel. Your steps will look like this:

Step that presses OK:

image-20240527-162823.png

Step that presses Cancel:

 

Â