An environment helps you create variables that you can reuse in requests and scripts. Environments are also useful when you need to manage shared data with a team.

Click on the "Environments" icon on the sidebar to create environments.

  • You can add your variables to Global environment, which can be accessed globally, ie. in every other evironments.

Using scripts

You can also create environment variables using scripts by using the pw object

pw.env.set("variable", "value");

Read more about environment variables

Creating environment variables from client

Learn how you can create environment variables from the client.

Creating environment variables using scripts

Learn how you can create environment variables using pre-request scripts.

Read more pre-request script examples

Learn more pre-request script examples.