set_viewport_size method

Class: ConfigurationPlatform: Selenium 3Language: Python SDK:

Set the viewport size to be used by the browser for the test.


configval = config.set_viewport_size(viewport_size)
config.viewport_size  = configval
configval = config.viewport_size

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


An object that defines the width and height of the test browser viewport in pixels.

Type definitions

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

Return value

Type: Self
The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.