Skip to main content

Target class

This class provides methods that are used to

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.

frame method

Syntax

eyes.check(Target.frame(context));
eyes.check(Target.frame(frame_ele, scrollRootElement_ele));
eyes.check(Target.frame(frame_ele));
eyes.check(Target.frame(frame_ele, scrollRootElement_sel));

eyes.check(Target.frame(frame_sel, scrollRootElement_ele));
eyes.check(Target.frame(frame_sel));
eyes.check(Target.frame(frame_sel, scrollRootElement_sel));

eyes.check(Target.frame(frame_str, scrollRootElement_ele));
eyes.check(Target.frame(frame_str));
eyes.check(Target.frame(frame_str, scrollRootElement_sel));

eyes.check(Target.frame(frame_num, scrollRootElement_ele));
eyes.check(Target.frame(frame_num));
eyes.check(Target.frame(frame_num, scrollRootElement_sel));

Parameters

context

Type: { frame: ElementHandle | Selector | string | number; scrollRootElement?: ElementHandle | Selector; };

A literal object that defines parameters for this call:

frame_ele

Type: ElementHandle

The element that contains the frame to be checked.

An element object whose bounding rectangle defines the frame to check.

scrollRootElement_ele

Type: ElementHandle [Optional ]

Normally, Eyes will select the most appropriate element to scroll to execute the fully method. You can use the scrollRootElement method to specify the element to scroll explicitly.

An element that should be scrolled to access the frame to be checked.

scrollRootElement_sel

Type: Selector [Optional ]

Normally, Eyes will select the most appropriate element to scroll to execute the fully method. You can use the scrollRootElement method to specify the element to scroll explicitly.

A selector to an element that should be scrolled to access the frame to be checked.

Type definitions

Selector

Used to identify an HTML element defined as string|{selector:string;Type: string}.

frame_sel

Type: Selector

The element that contains the frame to be checked.

A selector to an element object whose bounding rectangle defines the frame to check.

Type definitions

Selector

Used to identify an HTML element defined as string|{selector:string;Type: string}.

frame_str

Type: string

The element that contains the frame to be checked.

The name or id of the required frame.

frame_num

Type: number

The element that contains the frame to be checked.

The frame index of the required frame.

Return value

Type: CheckSettings

region method

Syntax

eyes.check(Target.region(region_obj));
eyes.check(Target.region(region_ele));
eyes.check(Target.region(region_sel));

Parameters

region_obj

Type: RegionPlain

The region to be checked.

The region is defined by the literal object RegionPlain.

Type definitions

RegionPlain

Used to describe a position and rectangular region in an image. RegionPlain is defined as: LocationPlain&RectangleSizePlain

region_ele

Type: ElementHandle

The region to be checked.

An element object whose bounding rectangle defines the area to check.

region_sel

Type: Selector

The region to be checked.

A selector to an element object whose bounding rectangle defines the area to check.

Type definitions

Selector

Used to identify an HTML element defined as string|{selector:string;Type: string}.

Return value

Type: CheckSettings

window method

Syntax

eyes.check(Target.window());

Parameters

This method does not take any parameters.

Return value

Type: CheckSettings