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

studio

#1

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?


#2

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:


#3

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.


#4

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


#5

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.