The information in this topic may be out of date. The current SDK reference guide has moved here.
Eyes class
Platform: Selenium 3Language: Java SDK:
This class provides the main methods used to execute tests and checkpoints.
Import statement
import com.applitools.eyes.selenium.Eyes;
Constructor
Methods
- abort()
- When a test is aborted, and it may be that not all of its checkpoints have excuted, call this method instead of closeAsync or close methods so that it will have an Aborted status in the Eyes Test Manager.
- abortAsync()
- When a test is aborted, and it may be that not all of its checkpoints have excuted, call this method instead of closeAsync or close methods so that it will have an Aborted status in the Eyes Test Manager.
- abortIfNotClosed()
- When a test is aborted, and it may be that not all of its checkpoints have excuted, call this method instead of closeAsync or close methods so that it will have an Aborted status in the Eyes Test Manager.
- addProperty()
- Adds a user-defined key name/value property that will be associated with tests.
- check()
- Run a checkpoint. Uses Fluent arguments to specify the various parameters.
- checkElement()
- Run a checkpoint on the area of a particular element.
- checkFrame()
- Run a checkpoint on the area of a particular frame.
- checkRegion()
- Checks a particular region of the checkpoint window.
- checkWindow()
- Runs a checkpoint of the entire application (e.g. browser) window.
- clearProperties()
- Clears any custom key name/value properties.
- 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.
- closeAsync()
- Call this method or Eyes.close at the end of the test. The call to closeAsync terminates the sequence of checkpoints and returns immediately, without waiting for the test results.
- 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.
- getConfiguration()
- Use this method to retrieve the current configuration object. This will be the most recent configuration object set using setConfiguration, or the initial default configuration object.
- getDebugScreenshotsPath()
- Use this method to retrieve the folder path where saved checkpoint images are stored (if enabled).
- getDebugScreenshotsPrefix()
- Use this method to retrieve the prefix added to the file names of locally stored checkpoint images (if enabled).
- getDevicePixelRatio()
- Use this method to retrieve the screen pixel ratio.
- getDriver()
- Use this method to retrieve the driver returned by the call to the open method.
- 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()
- hidescrollbars.get
- 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.
- 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.
- getMatchTimeout()
- Use this method to retrieve the maximum amount of time Eyes will try to perform a match on the fully captured image.
- 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.
- getRotation()
- Use this method to retrieve the rotation applied to checkpoint images before matching.
- getSaveDebugScreenshots()
- Use this method to retrieve whether or not checkpoint images are copied to a local file (for debugging).
- getSaveDiffs()
- Use this method to retrieve if steps that have mismatches are automatically saved to the baseline or not.
- 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.
- getScrollToRegion()
- Use this method to retrieve whether or not Eyes scrolls a region into view before capturing the image.
- 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.
- getStitchOverlap()
- Use this method to retrieve the overlap between sub-images when a scrolled window is stitched.
- 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.
- isSendDom()
- Returns whether the DOM is being sent to the server or not.
- locate()
- Use this method to search the current browser viewport for one or more graphics regions defined by visual locators.
- open()
- Call this method to start a test, before calling any of the check methods.
- 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.
- setConfiguration()
- Use this method to configure Eyes based on a configuration object.
- setDebugScreenshotsPath()
- Use this method to set the folder path where locally saved checkpoint images should be stored (if enabled).
- setDebugScreenshotsPrefix()
- Use this method to set the prefix that should be added to the file names for locally stored checkpoint images (if enabled).
- setExplicitViewportSize()
- Use this method to set the viewport size to be used to select the appropriate baseline. Calling this method does not change the actual browser viewport size.
- 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.
- 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.
- 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.
- setSaveDebugScreenshots()
- Use this method to set whether or not checkpoint images should be copied to a local file (typically for troubleshooting).
- 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.
- setScrollToRegion()
- Use this method to set whether or not Eyes scrolls a region into view before capturing the checkpoint.
- 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.
- setViewportSize()
- Set the default viewport size property. Eyes uses 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.