The information in this topic may be out of date. The current SDK reference guide has moved here.

region method

Class: TargetPlatform: Selenium 4Language: JavaScript SDK:

Configure check to match a region or element in a window, instead of the entire window.

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:WebElement

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 |import('selenium-webdriver').Locator|{using:string;value:string}|string|{selector:string;type:string}.

Return value

Type: CheckSettings