SetDeviceMetricsOverrideRequest

@Serializable
data class SetDeviceMetricsOverrideRequest(val width: Int, val height: Int, val deviceScaleFactor: Double, val mobile: Boolean, val scale: Double? = null, val screenWidth: Int? = null, val screenHeight: Int? = null, val positionX: Int? = null, val positionY: Int? = null, val dontSetVisibleSize: Boolean? = null, val screenOrientation: ScreenOrientation? = null, val viewport: Viewport? = null, val displayFeature: DisplayFeature? = null, val devicePosture: DevicePosture? = null)

Request object containing input parameters for the EmulationDomain.setDeviceMetricsOverride command.

Constructors

Link copied to clipboard
constructor(width: Int, height: Int, deviceScaleFactor: Double, mobile: Boolean, scale: Double? = null, screenWidth: Int? = null, screenHeight: Int? = null, positionX: Int? = null, positionY: Int? = null, dontSetVisibleSize: Boolean? = null, screenOrientation: ScreenOrientation? = null, viewport: Viewport? = null, displayFeature: DisplayFeature? = null, devicePosture: DevicePosture? = null)

Types

Link copied to clipboard
class Builder(val width: Int, val height: Int, val deviceScaleFactor: Double, val mobile: Boolean)

A builder for SetDeviceMetricsOverrideRequest, which allows setting the optional parameters of the EmulationDomain.setDeviceMetricsOverride command via a lambda.

Properties

Link copied to clipboard

If set, the posture of a foldable device. If not set the posture is set to continuous. Deprecated, use Emulation.setDevicePostureOverride.

Link copied to clipboard

Overriding device scale factor value. 0 disables the override.

Link copied to clipboard

If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off. Deprecated, use Emulation.setDisplayFeaturesOverride.

Link copied to clipboard

Do not set visible view size, rely upon explicit setVisibleSize call.

Link copied to clipboard
val height: Int

Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.

Link copied to clipboard

Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.

Link copied to clipboard

Overriding view X position on screen in pixels (minimum 0, maximum 10000000).

Link copied to clipboard

Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).

Link copied to clipboard

Scale to apply to resulting view image.

Link copied to clipboard

Overriding screen height value in pixels (minimum 0, maximum 10000000).

Link copied to clipboard

Screen orientation override.

Link copied to clipboard

Overriding screen width value in pixels (minimum 0, maximum 10000000).

Link copied to clipboard

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.

Link copied to clipboard
val width: Int

Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.