Eyes class

Platform: Selenium 3Language: JavaScript SDK:
This class provides the main methods used to execute tests and checkpoints.

Require statement

const {Eyes} = require('undefined');
	

Constructor

eyes()
This is the constructor for the Eyes class.

Methods

abortIfNotClosed()
When a test is aborted, and it may be that not all of its checkpoints have excuted, call this method instead of close methods so that it will have an Aborted status in the Eyes Test Manager.
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.
check()
Run a checkpoint. Uses Fluent arguments to specify the various parameters.
checkElement()
Run a checkpoint on the area of a particular element.
checkElementBy()
Run a checkpoint only on elements identified by a locator.
checkFrame()
Run a checkpoint on the area of a particular frame.
checkRegion()
Checks a particular region of the checkpoint window.
checkRegionBy()
Run a checkpoint only on a specific region in the window identified by a locator.
checkRegionByElement()
Run a checkpoint only on a specific region defined by an element.
checkWindow()
Runs a checkpoint of the entire application (e.g. browser) window.
close()
Call this method at the end of the test. This terminates the sequence of checkpoints, and then waits synchronously for the test results and returns them.
getAgentId()
Use this method to retrieve the name and version of the SDK.
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()
Use this method to retrieve the name of the application property.
getBaselineBranchName()
Use this method to retrieve the name of the branch the baseline reference will be taken from and where new and accepted steps will be saved to.
getBaselineEnvName()
Returns the name of the baseline environment defined for this test run.
getBatch()
Use this method to retrieve the batch information for tests.
getBranchName()
Use this method to retrieve the branch used for the baseline of this run.
getDefaultMatchTimeout()
Use this method to retrieve the maximum amount of time Eyes will try to perform a match on the fully captured image.
getForceFullPageScreenshot()
Use this method to retrieve whether or not Eyes does scrolling and stitching on pages whose size is greater than the viewport.
getForcedImageRotation()
Use this method to retrieve the rotation applied to checkpoint images before matching.
getHideScrollbars()
hidescrollbars.get
getHostOS()
Use this method to retrieve the name of the hosting operating system property.
getHostingApp()
Use this method to retrieve the name that is being used for the host application (browser) property.
getIgnoreCaret()
Use this method to retrieve whether or not Eyes eliminates mismatches due to blinking cursor artifacts.
getIsDisabled()
Use this method to retrieve whether or not interactions with Eyes are ignored.
getIsOpen()
Use this to know if the Eyes instance is currently open.
getMatchLevel()
Use this method to retrieve the default match level to be used for subsequent checkpoints in the test.
getParentBranchName()
Use this method to retrieve the parent branch, from which newly created branches get their initial baseline.
getProxy()
Use this method to retrieve the settings used to access the Eyes proxy server.
getSaveDebugScreenshots()
Use this method to retrieve whether or not checkpoint images are copied to a local file (for debugging).
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 that is applied to images before matching.
getScrollRootElement()
Returns the element to which setHideScrollbars will be applied
getServerUrl()
Use this method to retrieve the URL of the Eyes server used to process the captured images.
getStitchMode()
Use this method to retrieve the type of stitching used for full page screenshots.
getViewportSize()
Use this method to retrieve The value that was set for the viewport.
getWaitBeforeScreenshots()
Returns the amount of time in milliseconds that Eyes will wait before capturing a screenshot.
open()
Call this method to start a test, before calling any of the check methods.
replaceWindow()
Replace the captured image and associated metadata for a checkpoint with an image provided as a parameter.
setAgentId()
Use this method to set the name and version of the SDK.
setApiKey()
Use this method to set your Eyes license key.
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.
setDefaultMatchTimeout()
Use this method to set the maximum time Eyes will try to perform a match on the fully captured image.
setForceFullPageScreenshot()
Use this method to set whether or not Eyes does scrolling and stitching on pages whose size is greater than the viewport.
setForcedImageRotation()
Use this method to set the rotation to apply to the checkpoint images before matching.
setHideScrollbars()
Use this method to set whether Eyes hides the scrollbars before capturing screenshots or not.
setHostOS()
Use this method to set the name of the hosting operating system property.
setHostingApp()
Use this method to set the name of the hosting application property.
setIgnoreCaret()
Use this method to set whether or not Eyes eliminates mismatches due to blinking cursor artifacts.
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.
setProxy()
Use this method to configure Eyes so that it will interact with the Eyes server via a proxy.
setSaveDebugScreenshots()
Use this method to set whether or not checkpoint images should be copied to a local file (typically for troubleshooting).
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, to compensate for different vertical and horizontal pixels density on some devices.
setScrollRootElement()
Use this method to set the element to which setHideScrollbars will be applied.
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.
setViewportSize()
Set the default viewport size property. Eyes will use this if a subsequent call to open is done without a viewport size. This also changes the browser viewport size to the given size immediately, instead of when open is called.
setWaitBeforeScreenshots()
Use this method to set the amount of time in milliseconds that Eyes will wait before capturing a screenshot.