Playwright · Middle · Question 23 of 75
How do you pass a value like a user role through project options?
- 1Read an environment variable inside every single test
- 2Projects can't pass custom values, only browser settings
- 3Declare an option fixture and set it in each project's
use
Show the answer
Correct answer: Declare an option fixture and set it in each project's use
Explanation
Option fixtures ({ option: true }) have defaults that projects override, so one test suite can run with different roles or tenants.