Target class
This class provides methods that are used to define and configure the checkpoint target for methods such as check_window and check_region.
Once you create a CheckSettings object using one of the factory methods defined by this class, you can configure the checkpoint by calling other methods from the CheckSettings class, chaining them one after the other using the '.' operator.
Import statement
from applitools.selenium import Target
frame method
Syntax
eyes.check(Target.frame(frame_name_or_id))
eyes.check(Target.frame(frame_element))
eyes.check(Target.frame(frame_index))
eyes.check(Target.frame(frame_by_selector))
Note: This method is a static method.
Parameters
frame_name_or_id
Type: FrameNameOrId
The name or id of the frame element.
Type definitions
FrameNameOrId
The type FrameNameOrId is defined as: Text.
frame_element
Type: AnyWebElement
The element object of the frame.
Type definitions
AnyWebElement
The type AnyWebElement is defined as: Union[EyesWebElement,WebElement].
frame_index
Type: FrameIndex
A Selenium frame index.
Type definitions
FrameIndex
The type FrameIndex is defined as: int.
frame_by_selector
Type: BySelector
Any legal Selenium By request that refers to an iframe, passed as a dictionary, for example [By.TAG_NAME, "p"]
Type definitions
BySelector
The type BySelector is defined as: List[SeleniumBy,Text].
Return value
Type: CheckSettings
region method
Syntax
eyes.check(Target.region(region))
eyes.check(Target.region(css_selector))
eyes.check(Target.region(element))
eyes.check(Target.region(by_selector))
Note: This method is a static method.
Parameters
region
Type: Region
The region to be checked.
css_selector
Type: CssSelector
Any legal CSS selector, for example .myClass
Type definitions
CssSelector
The type CssSelector is defined as: Text.
element
Type: AnyWebElement
An object which defines a region.
Type definitions
AnyWebElement
The type AnyWebElement is defined as: Union[EyesWebElement,WebElement].
by_selector
Type: BySelector
Any legal Selenium By request passed as a dictionary, for example [By.TAG_NAME, "p"]
Type definitions
BySelector
The type BySelector is defined as: List[SeleniumBy,Text].
Return value
Type: CheckSettings
window method
Syntax
eyes.check(Target.window())
Note: This method is a static method.
Parameters
This method does not take any parameters.
Return value
Type: CheckSettings
Sending DOM information is enabled by default, so use this method only if you have to disable it.