Class EmulationAdapter
Represents an adapter for the Emulation domain to simplify the command interface.
public class EmulationAdapter
- Inheritance
-
EmulationAdapter
- Inherited Members
Constructors
EmulationAdapter(IDevToolsSession)
Initializes a new instance of the EmulationAdapter class.
public EmulationAdapter(IDevToolsSession session)
Parameters
sessionIDevToolsSessionThe IDevToolsSession to be used with this adapter.
Exceptions
- ArgumentNullException
If
sessionis null.
Properties
Session
Gets the DevToolsSession associated with the adapter.
public IDevToolsSession Session { get; }
Property Value
Methods
AddScreen(AddScreenCommandSettings, CancellationToken, int?, bool)
Add a new screen to the device. Only supported in headless mode.
public Task<AddScreenCommandResponse> AddScreen(AddScreenCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandAddScreenCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
CanEmulate(CanEmulateCommandSettings?, CancellationToken, int?, bool)
Tells whether emulation is supported.
public Task<CanEmulateCommandResponse> CanEmulate(CanEmulateCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandCanEmulateCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
ClearDeviceMetricsOverride(ClearDeviceMetricsOverrideCommandSettings?, CancellationToken, int?, bool)
Clears the overridden device metrics.
public Task<ClearDeviceMetricsOverrideCommandResponse?> ClearDeviceMetricsOverride(ClearDeviceMetricsOverrideCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandClearDeviceMetricsOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
ClearDevicePostureOverride(ClearDevicePostureOverrideCommandSettings?, CancellationToken, int?, bool)
Clears a device posture override set with either setDeviceMetricsOverride() or setDevicePostureOverride() and starts using posture information from the platform again. Does nothing if no override is set.
public Task<ClearDevicePostureOverrideCommandResponse?> ClearDevicePostureOverride(ClearDevicePostureOverrideCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandClearDevicePostureOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
ClearDisplayFeaturesOverride(ClearDisplayFeaturesOverrideCommandSettings?, CancellationToken, int?, bool)
Clears the display features override set with either setDeviceMetricsOverride() or setDisplayFeaturesOverride() and starts using display features from the platform again. Does nothing if no override is set.
public Task<ClearDisplayFeaturesOverrideCommandResponse?> ClearDisplayFeaturesOverride(ClearDisplayFeaturesOverrideCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandClearDisplayFeaturesOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
ClearGeolocationOverride(ClearGeolocationOverrideCommandSettings?, CancellationToken, int?, bool)
Clears the overridden Geolocation Position and Error.
public Task<ClearGeolocationOverrideCommandResponse?> ClearGeolocationOverride(ClearGeolocationOverrideCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandClearGeolocationOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
ClearIdleOverride(ClearIdleOverrideCommandSettings?, CancellationToken, int?, bool)
Clears Idle state overrides.
public Task<ClearIdleOverrideCommandResponse?> ClearIdleOverride(ClearIdleOverrideCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandClearIdleOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetOverriddenSensorInformation(GetOverriddenSensorInformationCommandSettings, CancellationToken, int?, bool)
getOverriddenSensorInformation
public Task<GetOverriddenSensorInformationCommandResponse> GetOverriddenSensorInformation(GetOverriddenSensorInformationCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetOverriddenSensorInformationCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetScreenInfos(GetScreenInfosCommandSettings?, CancellationToken, int?, bool)
Returns device's screen configuration.
public Task<GetScreenInfosCommandResponse> GetScreenInfos(GetScreenInfosCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetScreenInfosCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
RemoveScreen(RemoveScreenCommandSettings, CancellationToken, int?, bool)
Remove screen from the device. Only supported in headless mode.
public Task<RemoveScreenCommandResponse?> RemoveScreen(RemoveScreenCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandRemoveScreenCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
ResetPageScaleFactor(ResetPageScaleFactorCommandSettings?, CancellationToken, int?, bool)
Requests that page scale factor is reset to initial values.
public Task<ResetPageScaleFactorCommandResponse?> ResetPageScaleFactor(ResetPageScaleFactorCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandResetPageScaleFactorCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetAutoDarkModeOverride(SetAutoDarkModeOverrideCommandSettings, CancellationToken, int?, bool)
Automatically render all web contents using a dark theme.
public Task<SetAutoDarkModeOverrideCommandResponse?> SetAutoDarkModeOverride(SetAutoDarkModeOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetAutoDarkModeOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetAutomationOverride(SetAutomationOverrideCommandSettings, CancellationToken, int?, bool)
Allows overriding the automation flag.
public Task<SetAutomationOverrideCommandResponse?> SetAutomationOverride(SetAutomationOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetAutomationOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetCPUThrottlingRate(SetCPUThrottlingRateCommandSettings, CancellationToken, int?, bool)
Enables CPU throttling to emulate slow CPUs.
public Task<SetCPUThrottlingRateCommandResponse?> SetCPUThrottlingRate(SetCPUThrottlingRateCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetCPUThrottlingRateCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetDataSaverOverride(SetDataSaverOverrideCommandSettings, CancellationToken, int?, bool)
Override the value of navigator.connection.saveData
public Task<SetDataSaverOverrideCommandResponse?> SetDataSaverOverride(SetDataSaverOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetDataSaverOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetDefaultBackgroundColorOverride(SetDefaultBackgroundColorOverrideCommandSettings, CancellationToken, int?, bool)
Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.
public Task<SetDefaultBackgroundColorOverrideCommandResponse?> SetDefaultBackgroundColorOverride(SetDefaultBackgroundColorOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetDefaultBackgroundColorOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetDeviceMetricsOverride(SetDeviceMetricsOverrideCommandSettings, CancellationToken, int?, bool)
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).
public Task<SetDeviceMetricsOverrideCommandResponse?> SetDeviceMetricsOverride(SetDeviceMetricsOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetDeviceMetricsOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetDevicePostureOverride(SetDevicePostureOverrideCommandSettings, CancellationToken, int?, bool)
Start reporting the given posture value to the Device Posture API. This override can also be set in setDeviceMetricsOverride().
public Task<SetDevicePostureOverrideCommandResponse?> SetDevicePostureOverride(SetDevicePostureOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetDevicePostureOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetDisabledImageTypes(SetDisabledImageTypesCommandSettings, CancellationToken, int?, bool)
setDisabledImageTypes
public Task<SetDisabledImageTypesCommandResponse?> SetDisabledImageTypes(SetDisabledImageTypesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetDisabledImageTypesCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetDisplayFeaturesOverride(SetDisplayFeaturesOverrideCommandSettings, CancellationToken, int?, bool)
Start using the given display features to pupulate the Viewport Segments API. This override can also be set in setDeviceMetricsOverride().
public Task<SetDisplayFeaturesOverrideCommandResponse?> SetDisplayFeaturesOverride(SetDisplayFeaturesOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetDisplayFeaturesOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetDocumentCookieDisabled(SetDocumentCookieDisabledCommandSettings, CancellationToken, int?, bool)
setDocumentCookieDisabled
public Task<SetDocumentCookieDisabledCommandResponse?> SetDocumentCookieDisabled(SetDocumentCookieDisabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetDocumentCookieDisabledCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetEmitTouchEventsForMouse(SetEmitTouchEventsForMouseCommandSettings, CancellationToken, int?, bool)
setEmitTouchEventsForMouse
public Task<SetEmitTouchEventsForMouseCommandResponse?> SetEmitTouchEventsForMouse(SetEmitTouchEventsForMouseCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetEmitTouchEventsForMouseCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetEmulatedMedia(SetEmulatedMediaCommandSettings, CancellationToken, int?, bool)
Emulates the given media type or media feature for CSS media queries.
public Task<SetEmulatedMediaCommandResponse?> SetEmulatedMedia(SetEmulatedMediaCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetEmulatedMediaCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetEmulatedOSTextScale(SetEmulatedOSTextScaleCommandSettings, CancellationToken, int?, bool)
Emulates the given OS text scale.
public Task<SetEmulatedOSTextScaleCommandResponse?> SetEmulatedOSTextScale(SetEmulatedOSTextScaleCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetEmulatedOSTextScaleCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetEmulatedVisionDeficiency(SetEmulatedVisionDeficiencyCommandSettings, CancellationToken, int?, bool)
Emulates the given vision deficiency.
public Task<SetEmulatedVisionDeficiencyCommandResponse?> SetEmulatedVisionDeficiency(SetEmulatedVisionDeficiencyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetEmulatedVisionDeficiencyCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetFocusEmulationEnabled(SetFocusEmulationEnabledCommandSettings, CancellationToken, int?, bool)
Enables or disables simulating a focused and active page.
public Task<SetFocusEmulationEnabledCommandResponse?> SetFocusEmulationEnabled(SetFocusEmulationEnabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetFocusEmulationEnabledCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetGeolocationOverride(SetGeolocationOverrideCommandSettings, CancellationToken, int?, bool)
Overrides the Geolocation Position or Error. Omitting latitude, longitude or accuracy emulates position unavailable.
public Task<SetGeolocationOverrideCommandResponse?> SetGeolocationOverride(SetGeolocationOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetGeolocationOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetHardwareConcurrencyOverride(SetHardwareConcurrencyOverrideCommandSettings, CancellationToken, int?, bool)
setHardwareConcurrencyOverride
public Task<SetHardwareConcurrencyOverrideCommandResponse?> SetHardwareConcurrencyOverride(SetHardwareConcurrencyOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetHardwareConcurrencyOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetIdleOverride(SetIdleOverrideCommandSettings, CancellationToken, int?, bool)
Overrides the Idle state.
public Task<SetIdleOverrideCommandResponse?> SetIdleOverride(SetIdleOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetIdleOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetLocaleOverride(SetLocaleOverrideCommandSettings, CancellationToken, int?, bool)
Overrides default host system locale with the specified one.
public Task<SetLocaleOverrideCommandResponse?> SetLocaleOverride(SetLocaleOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetLocaleOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetNavigatorOverrides(SetNavigatorOverridesCommandSettings, CancellationToken, int?, bool)
Overrides value returned by the javascript navigator object.
public Task<SetNavigatorOverridesCommandResponse?> SetNavigatorOverrides(SetNavigatorOverridesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetNavigatorOverridesCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetPageScaleFactor(SetPageScaleFactorCommandSettings, CancellationToken, int?, bool)
Sets a specified page scale factor.
public Task<SetPageScaleFactorCommandResponse?> SetPageScaleFactor(SetPageScaleFactorCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetPageScaleFactorCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetPressureDataOverride(SetPressureDataOverrideCommandSettings, CancellationToken, int?, bool)
Provides a given pressure data set that will be processed and eventually be delivered to PressureObserver users. |source| must have been previously overridden by setPressureSourceOverrideEnabled.
public Task<SetPressureDataOverrideCommandResponse?> SetPressureDataOverride(SetPressureDataOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetPressureDataOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetPressureSourceOverrideEnabled(SetPressureSourceOverrideEnabledCommandSettings, CancellationToken, int?, bool)
Overrides a pressure source of a given type, as used by the Compute Pressure API, so that updates to PressureObserver.observe() are provided via setPressureStateOverride instead of being retrieved from platform-provided telemetry data.
public Task<SetPressureSourceOverrideEnabledCommandResponse?> SetPressureSourceOverrideEnabled(SetPressureSourceOverrideEnabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetPressureSourceOverrideEnabledCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetPressureStateOverride(SetPressureStateOverrideCommandSettings, CancellationToken, int?, bool)
TODO: OBSOLETE: To remove when setPressureDataOverride is merged. Provides a given pressure state that will be processed and eventually be delivered to PressureObserver users. |source| must have been previously overridden by setPressureSourceOverrideEnabled.
public Task<SetPressureStateOverrideCommandResponse?> SetPressureStateOverride(SetPressureStateOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetPressureStateOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetSafeAreaInsetsOverride(SetSafeAreaInsetsOverrideCommandSettings, CancellationToken, int?, bool)
Overrides the values for env(safe-area-inset-) and env(safe-area-max-inset-). Unset values will cause the respective variables to be undefined, even if previously overridden.
public Task<SetSafeAreaInsetsOverrideCommandResponse?> SetSafeAreaInsetsOverride(SetSafeAreaInsetsOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetSafeAreaInsetsOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetScriptExecutionDisabled(SetScriptExecutionDisabledCommandSettings, CancellationToken, int?, bool)
Switches script execution in the page.
public Task<SetScriptExecutionDisabledCommandResponse?> SetScriptExecutionDisabled(SetScriptExecutionDisabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetScriptExecutionDisabledCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetScrollbarsHidden(SetScrollbarsHiddenCommandSettings, CancellationToken, int?, bool)
setScrollbarsHidden
public Task<SetScrollbarsHiddenCommandResponse?> SetScrollbarsHidden(SetScrollbarsHiddenCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetScrollbarsHiddenCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetSensorOverrideEnabled(SetSensorOverrideEnabledCommandSettings, CancellationToken, int?, bool)
Overrides a platform sensor of a given type. If |enabled| is true, calls to Sensor.start() will use a virtual sensor as backend rather than fetching data from a real hardware sensor. Otherwise, existing virtual sensor-backend Sensor objects will fire an error event and new calls to Sensor.start() will attempt to use a real sensor instead.
public Task<SetSensorOverrideEnabledCommandResponse?> SetSensorOverrideEnabled(SetSensorOverrideEnabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetSensorOverrideEnabledCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetSensorOverrideReadings(SetSensorOverrideReadingsCommandSettings, CancellationToken, int?, bool)
Updates the sensor readings reported by a sensor type previously overridden by setSensorOverrideEnabled.
public Task<SetSensorOverrideReadingsCommandResponse?> SetSensorOverrideReadings(SetSensorOverrideReadingsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetSensorOverrideReadingsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetSmallViewportHeightDifferenceOverride(SetSmallViewportHeightDifferenceOverrideCommandSettings, CancellationToken, int?, bool)
Allows overriding the difference between the small and large viewport sizes, which determine the
value of the svh and lvh unit, respectively. Only supported for top-level frames.
public Task<SetSmallViewportHeightDifferenceOverrideCommandResponse?> SetSmallViewportHeightDifferenceOverride(SetSmallViewportHeightDifferenceOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetSmallViewportHeightDifferenceOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetTimezoneOverride(SetTimezoneOverrideCommandSettings, CancellationToken, int?, bool)
Overrides default host system timezone with the specified one.
public Task<SetTimezoneOverrideCommandResponse?> SetTimezoneOverride(SetTimezoneOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetTimezoneOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetTouchEmulationEnabled(SetTouchEmulationEnabledCommandSettings, CancellationToken, int?, bool)
Enables touch on platforms which do not support them.
public Task<SetTouchEmulationEnabledCommandResponse?> SetTouchEmulationEnabled(SetTouchEmulationEnabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetTouchEmulationEnabledCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetUserAgentOverride(SetUserAgentOverrideCommandSettings, CancellationToken, int?, bool)
Allows overriding user agent with the given string.
userAgentMetadata must be set for Client Hint headers to be sent.
public Task<SetUserAgentOverrideCommandResponse?> SetUserAgentOverride(SetUserAgentOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetUserAgentOverrideCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetVirtualTimePolicy(SetVirtualTimePolicyCommandSettings, CancellationToken, int?, bool)
Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget.
public Task<SetVirtualTimePolicyCommandResponse> SetVirtualTimePolicy(SetVirtualTimePolicyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetVirtualTimePolicyCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetVisibleSize(SetVisibleSizeCommandSettings, CancellationToken, int?, bool)
Resizes the frame/viewport of the page. Note that this does not affect the frame's container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android.
public Task<SetVisibleSizeCommandResponse?> SetVisibleSize(SetVisibleSizeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetVisibleSizeCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
Events
VirtualTimeBudgetExpired
Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
public event EventHandler<VirtualTimeBudgetExpiredEventArgs>? VirtualTimeBudgetExpired