SetDeviceMetricsOverrideRequest

data class SetDeviceMetricsOverrideRequest(width: Int, height: Int, deviceScaleFactor: Double, mobile: Boolean, scale: Double?, screenWidth: Int?, screenHeight: Int?, positionX: Int?, positionY: Int?, dontSetVisibleSize: Boolean?, screenOrientation: ScreenOrientation?, viewport: Viewport?, displayFeature: DisplayFeature?)

Represents request frame that can be used with Emulation#setDeviceMetricsOverride operation call.

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).

See also

Constructors

SetDeviceMetricsOverrideRequest
Link copied to clipboard
fun SetDeviceMetricsOverrideRequest(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)

Properties

deviceScaleFactor
Link copied to clipboard
val deviceScaleFactor: Double
Overriding device scale factor value.
displayFeature
Link copied to clipboard
val displayFeature: DisplayFeature? = null
If set, the display feature of a multi-segment screen.
dontSetVisibleSize
Link copied to clipboard
val dontSetVisibleSize: Boolean? = null
Do not set visible view size, rely upon explicit setVisibleSize call.
height
Link copied to clipboard
val height: Int
Overriding height value in pixels (minimum 0, maximum 10000000).
mobile
Link copied to clipboard
val mobile: Boolean
Whether to emulate mobile device.
positionX
Link copied to clipboard
val positionX: Int? = null
Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
positionY
Link copied to clipboard
val positionY: Int? = null
Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
scale
Link copied to clipboard
val scale: Double? = null
Scale to apply to resulting view image.
screenHeight
Link copied to clipboard
val screenHeight: Int? = null
Overriding screen height value in pixels (minimum 0, maximum 10000000).
screenOrientation
Link copied to clipboard
val screenOrientation: ScreenOrientation? = null
Screen orientation override.
screenWidth
Link copied to clipboard
val screenWidth: Int? = null
Overriding screen width value in pixels (minimum 0, maximum 10000000).
viewport
Link copied to clipboard
val viewport: Viewport? = null
If set, the visible area of the page will be overridden to this viewport.
width
Link copied to clipboard
val width: Int
Overriding width value in pixels (minimum 0, maximum 10000000).

Sources

jvm source
Link copied to clipboard