setBaselineEnvName method

Class: ConfigurationPlatform: PlaywrightLanguage: JavaScript SDK:

Use this method to set the name of the environment that will be used to determine the baseline.

Eyes stores a set of mappings from an environment name to an environment E, where E is defined as a triplet <OS, Browser, Viewport>. You can specify that Eyes uses the baseline defined by the environment name instead of the test environment by calling this method, passing the name of the environment as a parameter. If the name is undefined in the server when this test runs, and this property is assigned before then call to open, then the name will be created and defined on the server with values of the current test environment.


let configval = config.setBaselineEnvName(baselineEnvName);
config.baselineEnvName = configval;
configval = config.baselineEnvName;

Note that this feature is available as both a method and a property.


The name of the baseline environment.

Return value

Type: Configuration
The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.