How to handle a JavaScript popup in Chrome or Firefox

Follow the instructions below in order to read the text or click on the OK button of a JavaScript popup.

Example JavaScript popup window on web page

  1. Click on "Add Control" in the Process Designer and then the escape key for the UISpy window to appear.

  2. Add the control of the popup element (UI Custom) to the Controls Repository. It should look like the following:

    Popup element control properties

  3. Go to the Controls Repository. Double click on the added control.

  4. Delete the 2nd UI Selector.

  5. Modify the 1st selector as per the following instructions:

  6. Extract the text of the popup:

    Extract popup text

    Use the "Get Details of Element in Window" action with the above control in order to extract the text.

    Click the OK button.

    Using selector builder dialog to extract popup text

    Use the "Press Button in Window" action with the above control, in order to press on the OK button.