Playwright · Senior · Question 73 of 77

How do you handle third-party scripts like chat widgets that slow tests?

Show the answer

Correct answer: Block them with page.route unless the test is about them

Explanation

Blocking analytics and widgets removes noise and network flakiness. A separate test can check the integration itself.

Further reading

Problem with a question

Playwright · Senior · question 73

Test yourself

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

Take this quiz