Web page pop-up only appear for 2 sec, How to detect popup before it disappear?



I login to a web page and search for some text. Search may take few second or may take minutes.

If text found
In this case popup will not appear, In this case web page will change.

If text not found
there will a small pop-up for 2 second only. How can I capture this.
Since popup is appear for 2 sec and don’t know when it will come after click on search button.(Popup don’t have ‘ok’ button) .

How to handle this kind of scenario? where we can detect the popup before it disappear?


Hi @anilb, maybe you can try using Recording for that. Use the Pause (F2) and try detecting the pop up.

Hope it helps :slight_smile:


Thanks Quihan,

But if text found then the popup will not be there and webpage will change.
So it is if-else condition, not able to decide how to look for webpage change and popup.


I think is better for you to detect for the webpage change when found.


You said, If search text is found, the page changes. So you can detect if the page has changed which means the search text was found.
If the page is not changed that means the search text is not found. But here you have to set a timeout, may be 2, 5, 10, or 30 secs but you can not wait for indefinite time.

To answer your question, you can use “Element Exists” activity to detect the popup. Even if it appears for 2sec, it will be able to detect it. But you need to specify the timeout property to how long wait for the popup to appear.