Eyes class

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

Import statement

from applitools.selenium import Eyes
	

Constructor

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

Properties

device_pixel_ratioType:int
Use this property to retrieve and set the screen pixel ratio.
driverType:EyesWebDriver
Use this property to retrieve and set the driver returned by the call to the open method.
baseline_env_nameType:Text
Use this property to set and retrieve the name of the environment that will be used to determine the baseline.
ignore_caretType:bool
Use this property to retrieve and set whether or not Eyes eliminates mismatches due to blinking cursor artifacts.
is_openType:bool
Use this to know if the Eyes instance is currently open.
is_send_domType:bool
Returns whether the DOM is being sent to the server or not.
api_keyType:Text
Use this property to set and retrieve your Eyes license key.
app_nameType:Text
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.
baseline_branch_nameType:Text
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.
batchType:BatchInfo
Use this property to set and retrieve the batch information for this test.
branch_nameType:Text
Use this property to set and retrieve the branch used for the baseline of this run.
debug_screenshots_pathType:Text
Use this property to set and retrieve the folder path where locally saved checkpoint images should be stored (if enabled).
debug_screenshots_prefixType:Text
Use this property to set and retrieve the prefix that should be added to the file names for locally stored checkpoint images (if enabled).
host_appType:Text
Use this property to set and retrieve the name of the hosting application property.
host_osType:Text
Use this property to set and retrieve the name of the hosting operating system property.
rotationType:Union[int,float]
Use this property to set and retrieve the rotation to apply to the checkpoint images before matching.
save_debug_screenshotsType:bool
Use this property to set and retrieve whether or not checkpoint images should be copied to a local file (typically for troubleshooting).
send_domType:bool
Use this property to set and retrieve if DOM information should be sent for checkpoints.
stitch_overlapType:int
Use this property to set and retrieve the overlap between sub-images when a scrolled window is stitched.
viewport_sizeType:RectangleSize
The value that was set for the viewport.
configureType:Configuration
Use this to directly configure the eyes object using any of the methods exposed by the Configuration class.
agent_idType:Text
Use this property to set and retrieve the name and version of the SDK.
featuresType:Set[Feature]
Use this method to enable various Eyes features.
is_disabledType:bool
Use this property to set and retrieve whether or not interactions with Eyes will be silently ignored.
match_levelType:MatchLevel
Use this property to set and retrieve the default match level to be used for subsequent checkpoints in the test.
match_timeoutType:int
Use this property to set and retrieve the maximum time Eyes will try to perform a match on the fully captured image.
parent_branch_nameType:Text
Use this property to set and retrieve the parent branch from which newly created branches get their initial baseline.
save_diffsType:bool
Use this property to set and retrieve if steps that have mismatches should be automatically saved to the baseline or not.
save_new_testsType:bool
Use this property to set and retrieve whether or not 'new' tests are saved to the baseline by default.
scale_ratioType:float
Use this property to set and retrieve the scale ratio to be applied to images before matching, to compensate for different vertical and horizontal pixels density on some devices.
server_urlType:Text
Use this property to set and retrieve the URL of the Eyes server used to process the captured images.

Methods

abort()
When a test is aborted, and it may be that not all of its checkpoints have excuted, call this method instead of close_async or close methods so that it will have an Aborted status in the Eyes Test Manager.
abort_async()
When a test is aborted, and it may be that not all of its checkpoints have excuted, call this method instead of close_async or close methods so that it will have an Aborted status in the Eyes Test Manager.
abort_if_not_closed()
When a test is aborted, and it may be that not all of its checkpoints have excuted, call this method instead of close_async or close methods so that it will have an Aborted status in the Eyes Test Manager.
add_property()
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.
check_element()
Run a checkpoint on the area of a particular element.
check_frame()
Run a checkpoint on the area of a particular frame.
check_region()
Checks a particular region of the checkpoint window.
check_window()
Runs a checkpoint of the entire application (e.g. browser) window.
clear_properties()
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.
close_async()
Call this method or close at the end of the test. The call to close_async terminates the sequence of checkpoints and returns immediately, without waiting for the test results.
get_configuration()
Use this method to retrieve the current configuration object. This will be the most recent configuration object set using set_configuration, or the initial default configuration object.
get_viewport_size()
Use this method to retrieve The value that was set for the viewport.
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.
set_configuration()
Use this method to configure Eyes based on a configuration object.
set_viewport_size()
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.