Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Image RemovedImage Added

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 RemovedImage Added

Step that presses Cancel:

Image RemovedImage Added