Interacting with JS Popups

Learn how to interact with Javascript Popups in DogQ.

Some sites implement default Javascript popups to confirm certain actions or notify users about something important. These popup modals are built into Javascript and when on-screen they prevent user from interacting with the site until their condition is fulfilled. Javascript has three types of popup boxes: Alert box, Confirm box and Prompt box. The reserved word for these dialog boxes is JavascriptPopup.

Alert popups

Alert messages are usually implemented to make sure users are notified about something important. To continue using the site one would normally need to click OK, however with DogQ you don't need to do anything - the message will be accepted automatically.

Confirm popups

Conventionally, confirm dialog windows serve as safeguards when users perform certain signifact actions on a site, like deletion or changing of account information. To interact with a Confirm popup:

  1. find element: JavascriptPopup

  2. find element: OK / Cancel (depending on whether you want to accept or cancel the message)

  3. click element

Note that two Find element steps in a row here is by design. The first one is to signal to DogQ that it's the Javascript popup that you want to interact with and not the main page.

Prompt popups

Prompt popups can be used for numerous purposes. With this type of popups, users are asked to input a value before continuing. The process is almost the same as with the confirm popups, but instead of Find element you need to use the Find input - Type into combination:

  1. find input: JavascriptPopup

  2. type into: your answer

  3. find element: OK / Cancel (depending on whether you want continue or cancel the prompt)

  4. click element

Last updated