Eyes class

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

Constructor

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

Properties

driverType:EyesWebDriver
Use this method to retrieve the driver returned by the call to the open method.
is_openType:bool
Use this to know if the Eyes instance is currently open.
agent_idType:Text
This property can be used to set and retrieve the name and version of the SDK.
api_keyType:Text
This property can be used to set and retrieve your Eyes license key.
baseline_branch_nameType:Text
This property can be used 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
This property can be used to set and retrieve the batch information for this test.
branch_nameType:Text
This property can be used to set and retrieve the branch used for the baseline of this run.
fail_on_new_testType:bool
If true, Eyes will raise an exception if there is a new test (i.e. a test without a corresponding baseline image).
force_full_page_screenshotType:bool
This property can be used to set and retrieve whether or not Eyes does scrolling and stitching on pages whose size is greater than the viewport.
hide_scrollbarsType:bool
This property can be used to set and retrieve whether Eyes hides the scrollbars before capturing screenshots or not.
host_appType:Text
This property can be used to set and retrieve the name of the hosting application property.
is_disabledType:bool
This property can be used to set and retrieve whether or not interactions with Eyes will be silently ignored.
match_levelType:Text
This property can be used to set and retrieve the default match level to be used for subsequent checkpoints in the test.
match_timeoutType:int
This property can be used to set and retrieve the maximum time Eyes will try to perform a match on the fully captured image.
parent_branch_nameType:Text
This property can be used to set and retrieve the parent branch from which newly created branches get their initial baseline.
save_new_testsType:bool
This property can be used to set and retrieve whether or not 'new' tests are saved to the baseline by default.
send_domType:bool
This property can be used to set and retrieve if DOM information should be sent for checkpoints.
server_urlType:Text
This property can be used to set and retrieve the URL of the Eyes server used to process the captured images.
stitch_modeType:Text
This property can be used to set and retrieve the type of stitching used for full page screenshots.
wait_before_screenshotsType:int
This property can be used to set and retrieve the amount of time in milliseconds that Eyes will wait before capturing a screenshot.

Methods

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 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_region()
Checks a particular region of the checkpoint window.
check_region_by_element()
Run a checkpoint only on a specific region defined by an element.
check_region_in_frame_by_selector()
Check only a specific region in a specific frame.
check_window()
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.
get_viewport_size()
Use this method to retrieve The value that was set for the viewport.
open()
Call this method to start a test, before calling any of the check methods.
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.