setViewport
Resizes the browser viewport within the browser. As oppose to setWindowSize
,
this command changes the viewport size, not the window size.
Usage
browser.setViewport({ width, height, devicePixelRatio })
Parameters
Name | Type | Details |
---|---|---|
options | SetViewportOptions | command arguments |
options.width | number | viewport width in pixels |
options.height | number | viewport height in pixels |
options.devicePixelRatio | number | pixel ratio of the viewport |