How to handle pop up appear on the background

Hi,

I am using IE browser to work on my automation. I have to handle a pop up after click on a button which it might or might not appear.

So I use Image exist to handle this but apparently sometimes this pop up appear on the background so the image exist doesn’t work. The pop up still there but its not at the top of the screen. So it throws an error.

If a pop up appear, I will do certain step but if pop up does not appear it will do other steps. So its crucial for me to have the pop up to appear at the top of the screen also handling both situations.

How am I going to solve this issue?

Thanks in advance

Use element exist showing entire pop up window and put condition based on that

1 Like

Hi @jenkin,

You can use “Element exists” activity and indicate an unique element in the popup.
You can change the properties of the element exists activity like Wait for ready to COMPLETE and Timeout to the maximum amount of wait you need to wait for the popup to appear.
Then you can use an if condition to handle the popup from the output of the above Element exists activity.
Hope this helps.
Happy coding! :slight_smile:

Does Element exist works in the background? because sometimes the pop up does not appear at the top of the screen.

If pop up doesn’t appear then the element exists will be false and u can do required operation in else section

@jenkim

Yes, the element exists will also work if the popup is not in the foreground