Use environment overrides to customize your project to run in different environments, such as Development, QA, and Production environments.
Environment overrides in v21 replace Configurations in prior versions of Robot Studio but work in much the same way. You can override property values for variables, controls, and match rules at runtime for each environment.You can set values of certain variables and properties at runtime based on the environment you're running.
At runtime, the overrides are applied to the project before the project is run. In the following figure, the Text label for a Windows form in the Test environment is Test Form and in the Production environment it is Production Form.
Adding an environment override
Use environment overrides to configure different values for different environments, such as Test and Production environments.
- In the Property grid of an application, automation, or Windows form,
right-click the property you want to create overrides for.
Result: The Environment override button displays, as in the following figure:
- Click Environment override.
- Click Manage environments and then Add environment.
- Name the environment, such as Production, Test, or Development.
- When you are done adding environments, click Submit.
- Change the value of the property, based on the environment, as in the figure
below.Once you add overrides, Robot Studio adds an Environment overrides component to the project, as in the following figure.
- In the Environment overrides window, click
Test Environment to change the project
- Select the environment to test and click OK.
- Click Run all to test the environment.