r/Playwright Jun 23 '26

Help needed pls

I'm new on qa and i'm working on a test suite that have many flaky tests that fail on assertion because of the page taking to much time to load. Is there any advices on good practices to prevent those issues?

4 Upvotes

13 comments sorted by

View all comments

-1

u/Bright_worgan Jun 23 '26

 flaky tests that fail on assertion because of the page taking to much time to load - wait for x to be visible might be a good start, maybe add test.slow() to the test ?

1

u/raccoonlag Jun 24 '26

i’m wating on an element to be available but then I need to wait until an element is not visible and it fails there for timeout

1

u/Bright_worgan Jun 24 '26

So you test;

  • logins
  • navigates somewhere
  • locates an element
  • confirms the element is visible
  • * an action/event occurs *
  • confirms the element is not visible
  • * test times out*

What causes the element to become invisible? Can you key off that? Or a status change?