The information in this topic may be out of date. The current SDK reference guide has moved here.

Configuration class

Platform: ImagesLanguage: JavaScript SDK:
This class is used to create a configuration object that is used to configure an Eyes object by passing it to the Eyes.setConfiguration method.
You can use this configuration object instead of using the various Eyes methods and properties that set the same attributes. Typically you set up a Configuration object by calling its setXXXX methods chained with a '.' in a Fluent coding style. In this class, some attributes can be set by both a property and a set command. The properties allow you simple direct access to assign to and retrieve the attribute. The corresponding set method allows you to set multiple attributes using a Fluent style.

Require statement

const {Configuration} = require('@applitools/eyes-images');
	

Constructor

Configuration()
The constructor for the Configuration class. This object isset upand then passed to the Eyes.setConfiguration method before the call to the Eyes.open method.

Methods

addProperty()
Adds a user-defined key name/value property that will be associated with tests.
cloneConfig()
Returns a clone of the configuration object.
getAccessibilityValidation()
Use this method to retrieve the accessibility testing level.
getAgentId()
Returns the value configured by setAgentId.
getApiKey()
Use this method to retrieve your Eyes license key that you set with setApiKey, or was extracted from the APPLITOOLS_API_KEY environment variable.
getAppName()
Returns the value configured by setAppName or setAppName.
getBaselineBranchName()
Returns the value configured by setBaselineBranchName.
getBaselineEnvName()
Returns the value configured by setBaselineEnvName.
getBatch()
Returns the value configured by the setBatch method.
getBranchName()
Returns the branchname configured by setBranchName.
getDeviceInfo()
Retrieve the name of the device being rendered on the Ultrafast Grid, if it was configured explicitly by the user.
getHostApp()
Use this method to retrieve the name that is being used for the host application (browser) property.
getHostOS()
Use this method to retrieve the name of the hosting operating system property.
getIgnoreCaret()
Use this method to retrieve whether or not Eyes eliminates mismatches due to blinking cursor artifacts.
getIgnoreDisplacements()
Use this method to set whether Eyes ignores image features that have been displaced.
getIsDisabled()
Use this method to retrieve whether or not interactions with Eyes are ignored.
getMatchLevel()
Use this method to retrieve the default match level to be used for subsequent checkpoints in the test.
getParentBranchName()
Returns the value configured by setParentBranchName.
getProperties()
Returns the set of user-defined properties.
getProxy()
Use this method to retrieve the settings used to access the Eyes proxy server.
getSaveDiffs()
Returns the value configured by setSaveDiffs.
getSaveNewTests()
Use this method to retrieve whether or not 'new' tests are saved to the baseline by default.
getServerUrl()
Use this method to retrieve the URL of the Eyes server used to process the captured images.
getTestName()
Returns the value configured by setTestName.
getViewportSize()
Returns the value configured by setViewportSize.
setAccessibilityValidation()
Use this method to set the accessibility testing level to use.
setAgentId()
Use this method to set the name and version of the SDK.
setApiKey()
Use this method to set your Eyes license key.
setAppName()
Use this method to set the value of the application name property. The application name is one of the 5 properties that define the baseline.
setBaselineBranchName()
Use this method to set the name of the branch the baseline reference will be taken from and where new and accepted steps will be saved to.
setBaselineEnvName()
Use this method to set the name of the environment that will be used to determine the baseline.
setBatch()
Use this method to set the batch information for this test.
setBranchName()
Use this method to set the branch used for the baseline of this run.
setDeviceInfo()
Set the name of the device being rendered on the Ultrafast Grid.
setHostApp()
Use this method to set the name of the hosting application property.
setHostOS()
Use this method to set the name of the hosting operating system property.
setIgnoreCaret()
Use this method to set whether or not Eyes eliminates mismatches due to blinking cursor artifacts.
setIgnoreDisplacements()
Use this method to set whether Test Manager should initially display mismatches for image features that have only been displaced, as opposed to real mismatches.
setIsDisabled()
Use this method to set whether or not interactions with Eyes will be silently ignored.
setMatchLevel()
Use this method to set the default match level to be used for subsequent checkpoints in the test.
setParentBranchName()
Use this method to set the parent branch from which newly created branches get their initial baseline.
setProperties()
Set a list of user-defined properties each of which is a key/value pair.
setProxy()
Use this method to configure Eyes so that it will interact with the Eyes server via a proxy.
setSaveDiffs()
Use this method to set if steps that have mismatches should be automatically saved to the baseline or not.
setSaveNewTests()
Use this method to set whether or not 'new' tests are saved to the baseline by default.
setServerUrl()
Use this method to set the URL of the Eyes server used to process the captured images.
setTestName()
Use this method to set the name of the test.
setViewportSize()
Set the viewport size to be used by the browser for the test.