Playwright · Junior · Question 13 of 75

Why must Playwright actions and assertions be awaited?

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.

Further reading

Problem with a question

Playwright · Junior · question 13

Test yourself

Take the Playwright · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz