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 Eyes.open

Syntax

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.

Parameters

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

Type definitions

AnyWebDriver
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

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