Skip to content

browser.viewport.get#

Functions#

height() #

Get height of the viewport in pixels.

Returns:

Type Description
int

Height of the viewport in pixels.

Example
viewport_height = browser.viewport.get.height()

size() #

Get width and height of the viewport in pixels.

Returns:

Type Description
tuple[int, int]

Width and height of the viewport in pixels.

Example
viewport_width, viewport_height = browser.viewport.get.size()

width() #

Get width of the viewport in pixels.

Returns:

Type Description
int

Width of the viewport in pixels.

Example
viewport_width = browser.viewport.get.width()