A More Reliable Solution to Deal with Browser Popup Dialogs without OCR or Images

I’ve been wrestling with this issue for the whole day. A few weeks ago I had resolved a similar issue whilst working with Salesforce. But this time I had issues detecting the Browser dialog every time I moved my browser screen to a smaller monitor. Therefore, I decided to go in a slightly different direction. This solution works on monitors of all sizes and is free of Find Image or OCR scan based activities .

Below is a wire frame of something I’m working on. The Browser dialog pops up if the user hits the Download button without putting in an Item ID or an ID for which there is no manual available.


Now, instead of trying to find the OK button or the image of the pop up, this is how my solution works.

  1. Robot enters a non-existing Item ID into the text field and hits the Download button
  2. Browser Popup shows up with a message
  3. As the next step, the Robot clicks back into the Item ID field
  4. Now, because the screen is blocked, the above action results in an exception
  5. The Robot can determine that the screen has been blocked and send an Enter Hotkey command in the next step to dismiss the Browser popup.

That’s great! What happens if the User has put in an Item ID and clicked the Download button? In this case, there is no Browser popup. What then?

Well in this case the following happens:

  1. Robot enters Item ID and downloads the manual
  2. The robot clicks back into the Item ID field
  3. This time, the field is not blocked, and therefore a harmless click is recorded in the Item ID field
  4. As there is no exception, sending the Hotkey Enter is skipped!
  5. As the next step, the Robot checks if the manual has been downloaded because there are no errors in the previous steps

As long as the Item ID box is not wired to trigger some kind of update or script, we should be able to use this solution to deal with the Browser Popup and dismiss it without relying on OCR, or Image recognition activities.

Obviously, you don’t want to be clicking on a Link or a drop-down because that can cause issues when the page is not blocked by the pop up!

Here’s how the Sequence looks like. It has to be put it in after the normal sequence of entering the Item ID and clicking the download button.




Give it a shot! It works flawlessly for me across 3 different screens consistently!