getViewportSize method

Class: EyesPlatform: Selenium 4Language: JavaScript SDK:

Use this method to retrieve The value that was set for the viewport.

If the viewport is not set explicitly using e.g. using Eyes.setViewportSize, then this method may only be called after a call to Eyes.open

Syntax


let result = await eyes.getViewportSize();

let result = await eyes.getViewportSize(driver);

Parameters

driver
Type:EyesWebDriver
The driver returned from the call to open.

Return value

Type: Promise&lt;<a class ='link' href='/Content/api/eyes-sdk/index-gen/class-rectanglesize-selenium4-javascript.htm'>RectangleSize</a>&gt;