Playwright · Middle · Question 63 of 75

How do you load environment-specific values like a staging URL?

Show the answer

Correct answer: Read env variables, e.g. with dotenv, in the config

Explanation

The config is TypeScript, so it can read process.env.BASE_URL and choose settings per environment.

Further reading

Problem with a question

Playwright · Middle · question 63

Test yourself

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

Take this quiz