Configuration class

Platform: NightwatchLanguage: 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.

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.

Properties

agentIdType:string
Use this property to set and retrieve the name and version of the SDK.
apiKeyType:string
Use this property to set and retrieve your Eyes license key.
appNameType:string
Use this property to set and retrieve the value of the application name property. The application name is one of the 5 properties that define the baseline.
baselineBranchNameType:string
Use this property to set and retrieve the name of the branch the baseline reference will be taken from and where new and accepted steps will be saved to.
baselineEnvNameType:string
Use this property to set and retrieve the name of the environment that will be used to determine the baseline.
batchType:BatchInfoPlain
Use this property to set and retrieve the batch information for this test.
branchNameType:string
Use this property to set and retrieve the branch used for the baseline of this run.
browsersInfoType:(DesktopBrowserInfo|ChromeEmulationInfo|IOSDeviceInfo)[]
Sets the list of one or more browsers or devices to be rendered on the Ultrafast Grid.
forceFullPageScreenshotType:boolean
Use this property to set and retrieve whether or not Eyes does scrolling and stitching on pages whose size is greater than the viewport.
hideCaretType:boolean
Use this property to set and retrieve whether Eyes should hide the cursor before the screenshot is captured.
hideScrollbarsType:boolean
Use this property to set and retrieve whether Eyes hides the scrollbars before capturing screenshots or not.
hostAppType:string
Use this property to set and retrieve the name of the hosting application property.
hostAppInfoType:string
Set the value that shold be displayed in the Browser column of the Test Results page of the Test Manager.
hostOSType:string
Use this property to set and retrieve the name of the hosting operating system property.
hostOSInfoType:string
Set the value that shold be displayed in the OS column of the Test Results page of the Test Manager.
matchTimeoutType:number
Use this property to set and retrieve the maximum time Eyes will try to perform a match on the fully captured image.
parentBranchNameType:string
Use this property to set and retrieve the parent branch from which newly created branches get their initial baseline.
propertiesType:PropertyDataPlain[]
Set a list of user-defined properties each of which is a key/value pair.
rotationType:ImageRotationPlain
Use this property to set and retrieve the rotation to apply to the checkpoint images before matching.
saveDiffsType:boolean
Use this property to set and retrieve if steps that have mismatches should be automatically saved to the baseline or not.
saveNewTestsType:boolean
Use this property to set and retrieve whether or not 'new' tests are saved to the baseline by default.
sendDomType:boolean
Use this property to set and retrieve if DOM information should be sent for checkpoints.
serverUrlType:string
Use this property to set and retrieve the URL of the Eyes server used to process the captured images.
stitchModeType:StitchMode|'Scroll'|'CSS'
Use this property to set and retrieve the type of stitching used for full page screenshots.
stitchOverlapType:number
Use this property to set and retrieve the overlap between sub-images when a scrolled window is stitched.
testNameType:string
Use this property to set and retrieve the name of the test.
viewportSizeType:RectangleSizePlain
Use this property to set and retrieve the viewport size to be used by the browser for the test.
visualGridOptionsType:{[key:string]:any}
Use this property to set and retrieve configuration values for the Ultrafast Grid.
waitBeforeScreenshotsType:number
Use this property to set and retrieve the amount of time in milliseconds that Eyes will wait before capturing a screenshot.

Methods

addBrowser()
Request that the checkpoint be rendered by the Ultrafast Grid using a particular target desktop or mobile device browser.
addBrowsers()
Request that the checkpoint be rendered by the Ultrafast Grid using the specified desktop browsers and viewport sizes.
addDeviceEmulation()
Request that the checkpoint be rendered by the Ultrafast Grid using Chrome mobile emulation.
addProperty()
Adds a user-defined key name/value property that will be associated with tests.
clearProperties()
Clears any custom key name/value properties.
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.
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 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.
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.
getProxy()
Use this method to retrieve the settings used to access the Eyes proxy server.
getRotation()
Use this method to retrieve the amount the image is rotated before matching in degrees.
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.
getScaleRatio()
Use this method to retrieve the scale ratio to be applied to images before matching.
getScrollRootElement()
Returns the element to which Configuration.setHideScrollbars applies to.
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.
getVisualGridOptions()
Use this method to set configuration values for the Ultrafast Grid.
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 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.
setRotation()
Use this method to set the rotation to apply to the checkpoint images before matching.
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.
setScaleRatio()
Use this method to set the scale ratio to be applied to images before matching.
setScrollRootElement()
Use this method to set the element to which setHideScrollbars will be applied.
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.
setVisualGridOption()
Use this method to set configuration values for the Ultrafast Grid.
setWaitBeforeScreenshots()
Use this method to set the amount of time in milliseconds that Eyes will wait before capturing a screenshot.