Skip to main content
Environments are also useful when you need to manage shared data with a team. You can create environments and share them with your team members. Click on the “Environments” icon on the sidebar to create environments.
You can add your variables to the Global environment, which can be accessed globally, ie. in every other environment.

Using scripts

You can also create environment variables using scripts by using the pw object.
pw.env.set("variable", "value");

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.