Playwright · Junior · Question 13 of 75
Why must Playwright actions and assertions be awaited?
- 1They're async; without
awaitthe test may finish first - 2Without
awaitthey run in a separate browser instance - 3
awaitmakes them run in parallel with other tests
Show the answer
Correct answer: They're async; without await the test may finish first
Explanation
Every action talks to the browser asynchronously. A missing await lets the test move on or end before the step is done, which causes flaky or falsely passing tests.