setDeviceMetricsOverride
Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).
Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).
Parameters
Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
Overriding device scale factor value. 0 disables the override.
Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
Scale to apply to resulting view image.
Overriding screen width value in pixels (minimum 0, maximum 10000000).
Overriding screen height value in pixels (minimum 0, maximum 10000000).
Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
Do not set visible view size, rely upon explicit setVisibleSize call.
Screen orientation override.
If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.
If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off. Deprecated, use Emulation.setDisplayFeaturesOverride.
If set, the posture of a foldable device. If not set the posture is set to continuous. Deprecated, use Emulation.setDevicePostureOverride.