Playwright · Middle · Question 37 of 75
What does locator.waitFor() do?
- 1Waits until every network request has finished
- 2Waits until the element reaches a state like
visible - 3Waits for a fixed time, then checks the element
Show the answer
Correct answer: Waits until the element reaches a state like visible
Explanation
It's useful before reading values with methods that don't wait, though an assertion is usually clearer.