← Back to Discord Forum

alternative to page.wait_for_timeout()

Hello. I have a video window which would show a Play button on the first visit and a Play + Restart buttons after the video has played partially, if I refresh the page.

I am clicking the play btn and I need to wait for about 5-10 seconds (exact value not really important) before refreshing the page to see the Restart button. It seems page.wait_for_timeout() is pretty flaky for that purpose, so I am reaching out for any alternatives. I'm not sure there is an event I can wait for in this case, I just need to spend 10 seconds on the page.

Is that possible to do in a stable manner?

This thread is trying to answer question "Is there a stable alternative to page.wait_for_timeout() for waiting 5-10 seconds before refreshing a page?"

0 replies
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.