pub struct SetDeviceMetricsOverrideParamsBuilder<'a> { /* private fields */ }Implementations§
Source§impl<'a> SetDeviceMetricsOverrideParamsBuilder<'a>
impl<'a> SetDeviceMetricsOverrideParamsBuilder<'a>
Sourcepub fn screen_width(self, screen_width: u64) -> Self
pub fn screen_width(self, screen_width: u64) -> Self
Overriding screen width value in pixels (minimum 0, maximum 10000000).
Sourcepub fn screen_height(self, screen_height: i64) -> Self
pub fn screen_height(self, screen_height: i64) -> Self
Overriding screen height value in pixels (minimum 0, maximum 10000000).
Sourcepub fn position_x(self, position_x: i64) -> Self
pub fn position_x(self, position_x: i64) -> Self
Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
Sourcepub fn position_y(self, position_y: i64) -> Self
pub fn position_y(self, position_y: i64) -> Self
Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
Sourcepub fn dont_set_visible_size(self, dont_set_visible_size: bool) -> Self
pub fn dont_set_visible_size(self, dont_set_visible_size: bool) -> Self
Do not set visible view size, rely upon explicit setVisibleSize call.
Sourcepub fn screen_orientation(
self,
screen_orientation: ScreenOrientation<'a>,
) -> Self
pub fn screen_orientation( self, screen_orientation: ScreenOrientation<'a>, ) -> Self
Screen orientation override.
Sourcepub fn viewport(self, viewport: Viewport) -> Self
pub fn viewport(self, viewport: Viewport) -> Self
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.
Sourcepub fn display_feature(self, display_feature: DisplayFeature<'a>) -> Self
pub fn display_feature(self, display_feature: DisplayFeature<'a>) -> Self
If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off. Deprecated, use Emulation.setDisplayFeaturesOverride.
Sourcepub fn device_posture(self, device_posture: DevicePosture<'a>) -> Self
pub fn device_posture(self, device_posture: DevicePosture<'a>) -> Self
If set, the posture of a foldable device. If not set the posture is set to continuous. Deprecated, use Emulation.setDevicePostureOverride.
Sourcepub fn scrollbar_type(self, scrollbar_type: impl Into<Cow<'a, str>>) -> Self
pub fn scrollbar_type(self, scrollbar_type: impl Into<Cow<'a, str>>) -> Self
Scrollbar type. Default: ‘default’.
Sourcepub fn screen_orientation_lock_emulation(
self,
screen_orientation_lock_emulation: bool,
) -> Self
pub fn screen_orientation_lock_emulation( self, screen_orientation_lock_emulation: bool, ) -> Self
If set to true, enables screen orientation lock emulation, which intercepts screen.orientation.lock() calls from the page and reports orientation changes via screenOrientationLockChanged events. This is useful for emulating mobile device orientation lock behavior in responsive design mode.