setViewportSize method

Class: EyesPlatform: ImagesLanguage: Java SDK:

Set the default viewport size property. Eyes will use 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.


IConfigurationSetter value = Eyes.setViewportSize(size);


Type:<a class ='link' href='/Content/api/eyes-sdk/index-gen/class-rectanglesize-images-java.htm'>RectangleSize</a>

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':}

Return value

Type: IConfigurationSetter


  • Call this method before the call to Then, when calling the open method, don't pass the viewportSize parameter.
This method is a static method.