region method
Configure check to match a region in the checkpoint image, instead of the entire image.
Syntax
eyes.check(Target.region(base64String, rect));
eyes.check(Target.region(url, rect));
eyes.check(Target.region(filePath, rect));
eyes.check(Target.region(imageBuffer, rect));
Parameters
- base64String
- Type:string
- The checkpoint image in PNG format, encoded in base64.
- rect
- Type:
Region|RegionObject
- An object that defines a rectangular area in the window.
Type definitions
- 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.
- url
- Type:string
- A string with the URL of the checkpoint image. The image must be in PNG format.
- filePath
- Type:string
- A string with the file system path to the checkpoint image file. The image must be in PNG format.
- imageBuffer
- Type:Buffer
- The checkpoint image as an object in PNG format.
Return value
- Type: ImagesCheckSettings