setViewportSize method
Set the default viewport size property. Eyes uses this if a subsequent call to open is done without a viewport size.
This property will be displayed by the Test Manager along with the other test information. The value is also taken into consideration when finding a matching baseline. When using the Image SDK, the viewport size does not impact the image matching.
Syntax
await Eyes.setViewportSize(viewportSize);
Parameters
- viewportSize
- Type:
RectangleSize|RectangleSizeObject
The size of the viewport
The size of the viewport passed as an object.
The size of the viewport passed as an object {'width':, 'height':}
Type definitions
- RectangleSizeObject
- The type RectangleSizeObject is defined as: {width:number,height:number}.
Return value
- Type: Promise
Remarks
- Call this method before the call to Eyes.open. Then, when calling the open method, don't pass the viewportSize parameter.