Playwright · Senior · Question 29 of 77
Why are browser contexts cheap compared with launching browsers?
- 1Contexts share all cookies, so nothing is created
- 2A context is a new profile inside one running browser
- 3Contexts run without JavaScript or CSS engines
Show the answer
Correct answer: A context is a new profile inside one running browser
Explanation
Launching a browser takes about a second; a context takes milliseconds. That's why Playwright can give each test a fresh context.