region method

Class: TargetPlatform: WebdriverIO 5Language: JavaScript SDK:

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


eyes.check(Target.region(region, frame))


The region to be checked. This can either be a rectangular RegionObject defined as
{left: number, top: number, width: number, height: number}
, or an instance of a Region, webelement, or By locator.
The type RegionObject is defined as: {left:number,top:number,width:number,height:number,coordinatesType:CoordinatesType|undefined} The field coordinatesType is for internal use only and should not be set by users.
Type:Integer|String|By|WebElement|EyesWebElement [Optional ]
A representation of the iframe that encloses the region. Pass null if the region is in the main window. If this parameter is an integer, then it represents the frame index of the required frame. If it is a string, then it represents the name or id of the required frame. Otherwise, the frame is identifed by the passed By selector or WebElement.

Return value

Type: WebdriverioCheckSettings