Table of Contents

Class EmulationAdapter

Namespace
OpenQA.Selenium.DevTools.V85.Emulation
Assembly
WebDriver.dll

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 IDevToolsSession

The IDevToolsSession to be used with this adapter.

Properties

Session

Gets the DevToolsSession associated with the adapter.

public IDevToolsSession Session { get; }

Property Value

IDevToolsSession

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 CanEmulateCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<CanEmulateCommandResponse>

ClearDeviceMetricsOverride(ClearDeviceMetricsOverrideCommandSettings, CancellationToken, int?, bool)

clearDeviceMetricsOverride

public Task<ClearDeviceMetricsOverrideCommandResponse> ClearDeviceMetricsOverride(ClearDeviceMetricsOverrideCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ClearDeviceMetricsOverrideCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ClearDeviceMetricsOverrideCommandResponse>

ClearGeolocationOverride(ClearGeolocationOverrideCommandSettings, CancellationToken, int?, bool)

clearGeolocationOverride

public Task<ClearGeolocationOverrideCommandResponse> ClearGeolocationOverride(ClearGeolocationOverrideCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ClearGeolocationOverrideCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ClearGeolocationOverrideCommandResponse>

ResetPageScaleFactor(ResetPageScaleFactorCommandSettings, CancellationToken, int?, bool)

resetPageScaleFactor

public Task<ResetPageScaleFactorCommandResponse> ResetPageScaleFactor(ResetPageScaleFactorCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ResetPageScaleFactorCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ResetPageScaleFactorCommandResponse>

SetCPUThrottlingRate(SetCPUThrottlingRateCommandSettings, CancellationToken, int?, bool)

setCPUThrottlingRate

public Task<SetCPUThrottlingRateCommandResponse> SetCPUThrottlingRate(SetCPUThrottlingRateCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetCPUThrottlingRateCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetCPUThrottlingRateCommandResponse>

SetDefaultBackgroundColorOverride(SetDefaultBackgroundColorOverrideCommandSettings, CancellationToken, int?, bool)

setDefaultBackgroundColorOverride

public Task<SetDefaultBackgroundColorOverrideCommandResponse> SetDefaultBackgroundColorOverride(SetDefaultBackgroundColorOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetDefaultBackgroundColorOverrideCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetDefaultBackgroundColorOverrideCommandResponse>

SetDeviceMetricsOverride(SetDeviceMetricsOverrideCommandSettings, CancellationToken, int?, bool)

setDeviceMetricsOverride

public Task<SetDeviceMetricsOverrideCommandResponse> SetDeviceMetricsOverride(SetDeviceMetricsOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetDeviceMetricsOverrideCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetDeviceMetricsOverrideCommandResponse>

SetDocumentCookieDisabled(SetDocumentCookieDisabledCommandSettings, CancellationToken, int?, bool)

setDocumentCookieDisabled

public Task<SetDocumentCookieDisabledCommandResponse> SetDocumentCookieDisabled(SetDocumentCookieDisabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetDocumentCookieDisabledCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetDocumentCookieDisabledCommandResponse>

SetEmitTouchEventsForMouse(SetEmitTouchEventsForMouseCommandSettings, CancellationToken, int?, bool)

setEmitTouchEventsForMouse

public Task<SetEmitTouchEventsForMouseCommandResponse> SetEmitTouchEventsForMouse(SetEmitTouchEventsForMouseCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetEmitTouchEventsForMouseCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetEmitTouchEventsForMouseCommandResponse>

SetEmulatedMedia(SetEmulatedMediaCommandSettings, CancellationToken, int?, bool)

setEmulatedMedia

public Task<SetEmulatedMediaCommandResponse> SetEmulatedMedia(SetEmulatedMediaCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetEmulatedMediaCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetEmulatedMediaCommandResponse>

SetEmulatedVisionDeficiency(SetEmulatedVisionDeficiencyCommandSettings, CancellationToken, int?, bool)

setEmulatedVisionDeficiency

public Task<SetEmulatedVisionDeficiencyCommandResponse> SetEmulatedVisionDeficiency(SetEmulatedVisionDeficiencyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetEmulatedVisionDeficiencyCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetEmulatedVisionDeficiencyCommandResponse>

SetFocusEmulationEnabled(SetFocusEmulationEnabledCommandSettings, CancellationToken, int?, bool)

setFocusEmulationEnabled

public Task<SetFocusEmulationEnabledCommandResponse> SetFocusEmulationEnabled(SetFocusEmulationEnabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetFocusEmulationEnabledCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetFocusEmulationEnabledCommandResponse>

SetGeolocationOverride(SetGeolocationOverrideCommandSettings, CancellationToken, int?, bool)

setGeolocationOverride

public Task<SetGeolocationOverrideCommandResponse> SetGeolocationOverride(SetGeolocationOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetGeolocationOverrideCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetGeolocationOverrideCommandResponse>

SetLocaleOverride(SetLocaleOverrideCommandSettings, CancellationToken, int?, bool)

setLocaleOverride

public Task<SetLocaleOverrideCommandResponse> SetLocaleOverride(SetLocaleOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetLocaleOverrideCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetLocaleOverrideCommandResponse>

SetNavigatorOverrides(SetNavigatorOverridesCommandSettings, CancellationToken, int?, bool)

setNavigatorOverrides

public Task<SetNavigatorOverridesCommandResponse> SetNavigatorOverrides(SetNavigatorOverridesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetNavigatorOverridesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetNavigatorOverridesCommandResponse>

SetPageScaleFactor(SetPageScaleFactorCommandSettings, CancellationToken, int?, bool)

setPageScaleFactor

public Task<SetPageScaleFactorCommandResponse> SetPageScaleFactor(SetPageScaleFactorCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetPageScaleFactorCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetPageScaleFactorCommandResponse>

SetScriptExecutionDisabled(SetScriptExecutionDisabledCommandSettings, CancellationToken, int?, bool)

setScriptExecutionDisabled

public Task<SetScriptExecutionDisabledCommandResponse> SetScriptExecutionDisabled(SetScriptExecutionDisabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetScriptExecutionDisabledCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetScriptExecutionDisabledCommandResponse>

SetScrollbarsHidden(SetScrollbarsHiddenCommandSettings, CancellationToken, int?, bool)

setScrollbarsHidden

public Task<SetScrollbarsHiddenCommandResponse> SetScrollbarsHidden(SetScrollbarsHiddenCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetScrollbarsHiddenCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetScrollbarsHiddenCommandResponse>

SetTimezoneOverride(SetTimezoneOverrideCommandSettings, CancellationToken, int?, bool)

setTimezoneOverride

public Task<SetTimezoneOverrideCommandResponse> SetTimezoneOverride(SetTimezoneOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetTimezoneOverrideCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetTimezoneOverrideCommandResponse>

SetTouchEmulationEnabled(SetTouchEmulationEnabledCommandSettings, CancellationToken, int?, bool)

setTouchEmulationEnabled

public Task<SetTouchEmulationEnabledCommandResponse> SetTouchEmulationEnabled(SetTouchEmulationEnabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetTouchEmulationEnabledCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetTouchEmulationEnabledCommandResponse>

SetUserAgentOverride(SetUserAgentOverrideCommandSettings, CancellationToken, int?, bool)

setUserAgentOverride

public Task<SetUserAgentOverrideCommandResponse> SetUserAgentOverride(SetUserAgentOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetUserAgentOverrideCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetUserAgentOverrideCommandResponse>

SetVirtualTimePolicy(SetVirtualTimePolicyCommandSettings, CancellationToken, int?, bool)

setVirtualTimePolicy

public Task<SetVirtualTimePolicyCommandResponse> SetVirtualTimePolicy(SetVirtualTimePolicyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetVirtualTimePolicyCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetVirtualTimePolicyCommandResponse>

SetVisibleSize(SetVisibleSizeCommandSettings, CancellationToken, int?, bool)

setVisibleSize

public Task<SetVisibleSizeCommandResponse> SetVisibleSize(SetVisibleSizeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetVisibleSizeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetVisibleSizeCommandResponse>

Events

VirtualTimeBudgetExpired

virtualTimeBudgetExpired

public event EventHandler<VirtualTimeBudgetExpiredEventArgs> VirtualTimeBudgetExpired

Event Type

EventHandler<VirtualTimeBudgetExpiredEventArgs>