Configuration class

Platform: Selenium 4Language: 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.

Require statement

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

Constructor

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

Methods

addBrowser()
Request that the Ultrafast Grid generate checkpoint images using a particular desktop browser and viewport size.
addBrowsers()
Request that the Ultrafast Grid generate checkpoint images for a list of desktop browsers and viewport sizes.
addDeviceEmulation()
Request that the Ultrafast Grid generate checkpoint images for an emulated mobile device.
addProperty()
Adds a custom key name/value property that will be associated with tests. You can view these properties and filter and group by these properties in the Test Manager.
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 setBatch.
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.
getForceFullPageScreenshot()
Use this method to retrieve whether or not Eyes does scrolling and stitching on pages whose size is greater than the viewport.
getHideCaret()
Use this method to retrieve whether Eyes hides the cursor before the screenshot is captured or not.
getHideScrollbars()
Use this method to retrieve whether Eyes hides the scrollbars before capturing screenshots or not.
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 that is used for the Host OS 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.
getMatchTimeout()
Use this method to retrieve the maximum amount of time Eyes will try to perform a match on the fully captured image.
getParentBranchName()
Returns the value configured by setParentBranchName.
getProperties()
Returns the set of user defined properties.
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.
getSendDom()
Use this method to retrieve if DOM information is being sent for checkpoints.
getServerUrl()
Use this method to retrieve the URL of the Eyes server used to process the captured images.
getStitchMode()
Returns the value configured by setStitchMode.
getStitchOverlap()
Use this method to retrieve the overlap between sub-images when a scrolled window is stitched.
getTestName()
Returns the value configured by setTestName.
getViewportSize()
Returns the value configured by setViewportSize.
getWaitBeforeScreenshots()
Returns the amount of time in milliseconds that Eyes will wait before capturing a screenshot.
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.
setBrowsersInfo()
Sets the devices to be rendered on the Ultrafast Grid.
setDeviceInfo()
Set the name of the device being rendered on the Ultrafast Grid.
setForceFullPageScreenshot()
Use this method to set whether or not Eyes does scrolling and stitching on pages whose size is greater than the viewport.
setHideCaret()
Use this method to set whether Eyes should hide the cursor before the screenshot is captured.
setHideScrollbars()
Use this method to set whether Eyes hides the scrollbars before capturing screenshots or not.
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.
setMatchTimeout()
Use this method to set the maximum time Eyes will try to perform a match on the fully captured image.
setParentBranchName()
Use this method to set the parent branch from which newly created branches get their initial baseline.
setProperties()
Set a list user defined properties.
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.
setSendDom()
Use this method to set if DOM information should be sent for checkpoints.
setServerUrl()
Use this method to set the URL of the Eyes server used to process the captured images.
setStitchMode()
Use this method to set the type of stitching used for full page screenshots.
setStitchOverlap()
Use this method to set the overlap between sub-images when a scrolled window is stitched.
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.
setWaitBeforeScreenshots()
Use this method to set the amount of time in milliseconds that Eyes will wait before capturing a screenshot.