floatingRegions method

Class: CheckSettingsPlatform: PlaywrightLanguage: JavaScript SDK:

Define multiple floating regions for this target.

Syntax

eyes.check(Target.window().floatingRegions(regions_arr1));

eyes.check(Target.window().floatingRegions(maxOffset, regions_arr2));

Parameters

regions_arr1
Type:
(
  | {
      region: RegionPlain | ElementHandle | Selector;
      maxUpOffset?: number;
      maxDownOffset?: number;
      maxLeftOffset?: number;
      maxRightOffset?: number;
    }
  | RegionPlain
  | ElementHandle
  | Selector
)[];

One or more regions, selectors or elements that describe the floating region.

An array of objects, each of which defines a region and the offsets to allow.

Type definitions

RegionPlain
Used to describe a position and rectangular region in an image. RegionPlain is defined as: LocationPlain&RectangleSizePlain
maxOffset
Type:number
The maximum amount that the region can shift in any direction and still be considered matching.
regions_arr2
Type:
(RegionPlain|ElementHandle|Selector)[]

One or more regions, selectors or elements that describe the floating region.

An array of objects that define regions.

Type definitions

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

Return value

Type: CheckSettings
The value returned is the object that called the method. You can use it to call other methods supported by the object class.