UI Flow - capture if a pop up window is Open or not and put a conditional logic on that

Hi Team,

One of our partner partner has built a Web UI flow and encounters an issue with a pop-up section within the same browser window that sometimes would close automatically without any additional input. His Flow contains a step to close the pop-up section and would not proceed if the pop-up cannot be found.

What are the recommendations to create a conditional statement that would allow the Flow to proceed if the pop-up section is not present in the browser window?

Any input on this will be very helpful.

See here: If {picture} then {do this}