The information in this topic may be out of date. The current SDK reference guide has moved here.

get_viewport_size method

Class: EyesPlatform: Selenium 3Language: Python 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.set_viewport_size, then this method may only be called after a call to


value = eyes.get_viewport_size(driver)
eyes.viewport_size  = value
value = eyes.viewport_size

Note: This method is a static method.

Note that this feature is available as both a method and a property.


The driver returned from the call to open.

Type definitions

The type AnyWebDriver is defined as: Union[EyesWebDriver,WebDriver]. This object can be used in the same way as the Selenium driver object.

Return value

Type: ViewPort
The viewport size in the form {'width': 800, 'height': 600}.

Type definitions

The type ViewPort is defined as: Union[Dict[Text,int],RectangleSize]