setConfiguration method

Class: EyesPlatform: Selenium 4Language: JavaScript SDK:

Use this method to configure Eyes based on a configuration object.


eyes.configuration = value;
value = eyes.configuration;

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


A configuration object that has the various properties/methods set to the required values.

Return value

Type: void


The typical sequence for configuring a test is:
  • Create a Configuration object.
  • Set the properties you want to set up, using the various set methods.
  • Create an Eyes instance.
  • Call the Eyes.setConfiguration method with the configuration object.
  • Call the method to start the test session.
Once you've changed the configuration of an Eyes instance by calling Eyes.setConfiguration or by setting a configuration directly on the Eyes instance, if you want to change the configuration, you must use the following sequence:
  • Get the current configuration using Eyes.getConfiguration to a local variable.
  • Make changes to the local configuration value.
  • Assign the local configuration object to the Eyes instance using Eyes.setConfiguration.