region method

Class: SeleniumCheckSettingsPlatform: Selenium 4Language: JavaScript SDK:

Requests that only a region within a selected i-frame should be matched.

Syntax


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

Parameters

region
Type:<a class ='link' href='/Content/api/eyes-sdk/index-gen/class-region-selenium4-javascript.htm'>Region</a>|RegionObject|By|WebElement|EyesWebElement|string
An object that defines a rectangular area in the window.
RegionObject
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.

Return value

Type: <a class ='link' href='/Content/api/eyes-sdk/index-gen/class-checksettings-selenium4-javascript.htm'>SeleniumCheckSettings</a>
The value returned is the object that called the method. You can use it to call other methods supported by the object class.

Remarks

The parameter to the method specifies the region to be matched. The enclosing frame(s) are selected by the previous calls in the chain to Target.frame. You may only use this method in the chain if the first method in the chain is Target.frame. You may not call it if the first method in the chain is Target.window or Target.region. To match a region within a window, use the method Target.region as the first method in the Target chain. You may only call this method once in a given chain.