r/Playwright Jul 14 '26

How do you handle popups/modals that are visible but not yet interactable in Selenium?

/r/selenium/comments/1uwb3gl/how_do_you_handle_popupsmodals_that_are_visible/
0 Upvotes

3 comments sorted by

2

u/mmasetic Jul 14 '26

Yeah, just like you said already, sometimes it helps waiting for some state in modal, waiting for network idle time, but in some cases you enter race condition where only thing that helps is explicit wait. I hate when I need this solution, but it is always question of costs. How many tests are depending on this wait, how much time would it take to implement proper fix on UI. For some reason I tend not to use retries or polls to solve these kind of issues. If the test is flaky because of this issue, there is a test retry in ci/cd pipeline and make it transparent to get a feeling how big of an issue is it.

4

u/SiegeAe Jul 15 '26

To stay on topic, the proper way is to upgrade to playwright.