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
session
IDevToolsSessionThe IDevToolsSession to be used with this adapter.
Exceptions
- ArgumentNullException
If
session
is null.
Properties
Session
Gets the DevToolsSession associated with the adapter.
public IDevToolsSession Session { get; }
Property Value
Methods
CanEmulate(CanEmulateCommandSettings?, CancellationToken, int?, bool)
canEmulate
public Task<CanEmulateCommandResponse> CanEmulate(CanEmulateCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
CanEmulateCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
ClearDeviceMetricsOverride(ClearDeviceMetricsOverrideCommandSettings?, CancellationToken, int?, bool)
clearDeviceMetricsOverride
public Task<ClearDeviceMetricsOverrideCommandResponse?> ClearDeviceMetricsOverride(ClearDeviceMetricsOverrideCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
ClearDeviceMetricsOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
ClearDevicePostureOverride(ClearDevicePostureOverrideCommandSettings?, CancellationToken, int?, bool)
clearDevicePostureOverride
public Task<ClearDevicePostureOverrideCommandResponse?> ClearDevicePostureOverride(ClearDevicePostureOverrideCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
ClearDevicePostureOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
ClearGeolocationOverride(ClearGeolocationOverrideCommandSettings?, CancellationToken, int?, bool)
clearGeolocationOverride
public Task<ClearGeolocationOverrideCommandResponse?> ClearGeolocationOverride(ClearGeolocationOverrideCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
ClearGeolocationOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
ClearIdleOverride(ClearIdleOverrideCommandSettings?, CancellationToken, int?, bool)
clearIdleOverride
public Task<ClearIdleOverrideCommandResponse?> ClearIdleOverride(ClearIdleOverrideCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
ClearIdleOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetOverriddenSensorInformation(GetOverriddenSensorInformationCommandSettings, CancellationToken, int?, bool)
getOverriddenSensorInformation
public Task<GetOverriddenSensorInformationCommandResponse> GetOverriddenSensorInformation(GetOverriddenSensorInformationCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetOverriddenSensorInformationCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
ResetPageScaleFactor(ResetPageScaleFactorCommandSettings?, CancellationToken, int?, bool)
resetPageScaleFactor
public Task<ResetPageScaleFactorCommandResponse?> ResetPageScaleFactor(ResetPageScaleFactorCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
ResetPageScaleFactorCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetAutoDarkModeOverride(SetAutoDarkModeOverrideCommandSettings, CancellationToken, int?, bool)
setAutoDarkModeOverride
public Task<SetAutoDarkModeOverrideCommandResponse?> SetAutoDarkModeOverride(SetAutoDarkModeOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetAutoDarkModeOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetAutomationOverride(SetAutomationOverrideCommandSettings, CancellationToken, int?, bool)
setAutomationOverride
public Task<SetAutomationOverrideCommandResponse?> SetAutomationOverride(SetAutomationOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetAutomationOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetCPUThrottlingRate(SetCPUThrottlingRateCommandSettings, CancellationToken, int?, bool)
setCPUThrottlingRate
public Task<SetCPUThrottlingRateCommandResponse?> SetCPUThrottlingRate(SetCPUThrottlingRateCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetCPUThrottlingRateCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetDefaultBackgroundColorOverride(SetDefaultBackgroundColorOverrideCommandSettings, CancellationToken, int?, bool)
setDefaultBackgroundColorOverride
public Task<SetDefaultBackgroundColorOverrideCommandResponse?> SetDefaultBackgroundColorOverride(SetDefaultBackgroundColorOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetDefaultBackgroundColorOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetDeviceMetricsOverride(SetDeviceMetricsOverrideCommandSettings, CancellationToken, int?, bool)
setDeviceMetricsOverride
public Task<SetDeviceMetricsOverrideCommandResponse?> SetDeviceMetricsOverride(SetDeviceMetricsOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetDeviceMetricsOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetDevicePostureOverride(SetDevicePostureOverrideCommandSettings, CancellationToken, int?, bool)
setDevicePostureOverride
public Task<SetDevicePostureOverrideCommandResponse?> SetDevicePostureOverride(SetDevicePostureOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetDevicePostureOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetDisabledImageTypes(SetDisabledImageTypesCommandSettings, CancellationToken, int?, bool)
setDisabledImageTypes
public Task<SetDisabledImageTypesCommandResponse?> SetDisabledImageTypes(SetDisabledImageTypesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetDisabledImageTypesCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetDocumentCookieDisabled(SetDocumentCookieDisabledCommandSettings, CancellationToken, int?, bool)
setDocumentCookieDisabled
public Task<SetDocumentCookieDisabledCommandResponse?> SetDocumentCookieDisabled(SetDocumentCookieDisabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetDocumentCookieDisabledCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetEmitTouchEventsForMouse(SetEmitTouchEventsForMouseCommandSettings, CancellationToken, int?, bool)
setEmitTouchEventsForMouse
public Task<SetEmitTouchEventsForMouseCommandResponse?> SetEmitTouchEventsForMouse(SetEmitTouchEventsForMouseCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetEmitTouchEventsForMouseCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetEmulatedMedia(SetEmulatedMediaCommandSettings, CancellationToken, int?, bool)
setEmulatedMedia
public Task<SetEmulatedMediaCommandResponse?> SetEmulatedMedia(SetEmulatedMediaCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetEmulatedMediaCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetEmulatedVisionDeficiency(SetEmulatedVisionDeficiencyCommandSettings, CancellationToken, int?, bool)
setEmulatedVisionDeficiency
public Task<SetEmulatedVisionDeficiencyCommandResponse?> SetEmulatedVisionDeficiency(SetEmulatedVisionDeficiencyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetEmulatedVisionDeficiencyCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetFocusEmulationEnabled(SetFocusEmulationEnabledCommandSettings, CancellationToken, int?, bool)
setFocusEmulationEnabled
public Task<SetFocusEmulationEnabledCommandResponse?> SetFocusEmulationEnabled(SetFocusEmulationEnabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetFocusEmulationEnabledCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetGeolocationOverride(SetGeolocationOverrideCommandSettings, CancellationToken, int?, bool)
setGeolocationOverride
public Task<SetGeolocationOverrideCommandResponse?> SetGeolocationOverride(SetGeolocationOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetGeolocationOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetHardwareConcurrencyOverride(SetHardwareConcurrencyOverrideCommandSettings, CancellationToken, int?, bool)
setHardwareConcurrencyOverride
public Task<SetHardwareConcurrencyOverrideCommandResponse?> SetHardwareConcurrencyOverride(SetHardwareConcurrencyOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetHardwareConcurrencyOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetIdleOverride(SetIdleOverrideCommandSettings, CancellationToken, int?, bool)
setIdleOverride
public Task<SetIdleOverrideCommandResponse?> SetIdleOverride(SetIdleOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetIdleOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetLocaleOverride(SetLocaleOverrideCommandSettings, CancellationToken, int?, bool)
setLocaleOverride
public Task<SetLocaleOverrideCommandResponse?> SetLocaleOverride(SetLocaleOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetLocaleOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetNavigatorOverrides(SetNavigatorOverridesCommandSettings, CancellationToken, int?, bool)
setNavigatorOverrides
public Task<SetNavigatorOverridesCommandResponse?> SetNavigatorOverrides(SetNavigatorOverridesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetNavigatorOverridesCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetPageScaleFactor(SetPageScaleFactorCommandSettings, CancellationToken, int?, bool)
setPageScaleFactor
public Task<SetPageScaleFactorCommandResponse?> SetPageScaleFactor(SetPageScaleFactorCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetPageScaleFactorCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetPressureSourceOverrideEnabled(SetPressureSourceOverrideEnabledCommandSettings, CancellationToken, int?, bool)
setPressureSourceOverrideEnabled
public Task<SetPressureSourceOverrideEnabledCommandResponse?> SetPressureSourceOverrideEnabled(SetPressureSourceOverrideEnabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetPressureSourceOverrideEnabledCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetPressureStateOverride(SetPressureStateOverrideCommandSettings, CancellationToken, int?, bool)
setPressureStateOverride
public Task<SetPressureStateOverrideCommandResponse?> SetPressureStateOverride(SetPressureStateOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetPressureStateOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetScriptExecutionDisabled(SetScriptExecutionDisabledCommandSettings, CancellationToken, int?, bool)
setScriptExecutionDisabled
public Task<SetScriptExecutionDisabledCommandResponse?> SetScriptExecutionDisabled(SetScriptExecutionDisabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetScriptExecutionDisabledCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetScrollbarsHidden(SetScrollbarsHiddenCommandSettings, CancellationToken, int?, bool)
setScrollbarsHidden
public Task<SetScrollbarsHiddenCommandResponse?> SetScrollbarsHidden(SetScrollbarsHiddenCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetScrollbarsHiddenCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetSensorOverrideEnabled(SetSensorOverrideEnabledCommandSettings, CancellationToken, int?, bool)
setSensorOverrideEnabled
public Task<SetSensorOverrideEnabledCommandResponse?> SetSensorOverrideEnabled(SetSensorOverrideEnabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetSensorOverrideEnabledCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetSensorOverrideReadings(SetSensorOverrideReadingsCommandSettings, CancellationToken, int?, bool)
setSensorOverrideReadings
public Task<SetSensorOverrideReadingsCommandResponse?> SetSensorOverrideReadings(SetSensorOverrideReadingsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetSensorOverrideReadingsCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetTimezoneOverride(SetTimezoneOverrideCommandSettings, CancellationToken, int?, bool)
setTimezoneOverride
public Task<SetTimezoneOverrideCommandResponse?> SetTimezoneOverride(SetTimezoneOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetTimezoneOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetTouchEmulationEnabled(SetTouchEmulationEnabledCommandSettings, CancellationToken, int?, bool)
setTouchEmulationEnabled
public Task<SetTouchEmulationEnabledCommandResponse?> SetTouchEmulationEnabled(SetTouchEmulationEnabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetTouchEmulationEnabledCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetUserAgentOverride(SetUserAgentOverrideCommandSettings, CancellationToken, int?, bool)
setUserAgentOverride
public Task<SetUserAgentOverrideCommandResponse?> SetUserAgentOverride(SetUserAgentOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetUserAgentOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetVirtualTimePolicy(SetVirtualTimePolicyCommandSettings, CancellationToken, int?, bool)
setVirtualTimePolicy
public Task<SetVirtualTimePolicyCommandResponse> SetVirtualTimePolicy(SetVirtualTimePolicyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetVirtualTimePolicyCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetVisibleSize(SetVisibleSizeCommandSettings, CancellationToken, int?, bool)
setVisibleSize
public Task<SetVisibleSizeCommandResponse?> SetVisibleSize(SetVisibleSizeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetVisibleSizeCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
Events
VirtualTimeBudgetExpired
virtualTimeBudgetExpired
public event EventHandler<VirtualTimeBudgetExpiredEventArgs>? VirtualTimeBudgetExpired