Class BrowserAdapter
Represents an adapter for the Browser domain to simplify the command interface.
public class BrowserAdapter
- Inheritance
-
BrowserAdapter
- Inherited Members
Constructors
BrowserAdapter(IDevToolsSession)
Initializes a new instance of the BrowserAdapter class.
public BrowserAdapter(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
AddPrivacySandboxEnrollmentOverride(AddPrivacySandboxEnrollmentOverrideCommandSettings, CancellationToken, int?, bool)
addPrivacySandboxEnrollmentOverride
public Task<AddPrivacySandboxEnrollmentOverrideCommandResponse?> AddPrivacySandboxEnrollmentOverride(AddPrivacySandboxEnrollmentOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
AddPrivacySandboxEnrollmentOverrideCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
CancelDownload(CancelDownloadCommandSettings, CancellationToken, int?, bool)
cancelDownload
public Task<CancelDownloadCommandResponse?> CancelDownload(CancelDownloadCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
CancelDownloadCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
Close(CloseCommandSettings?, CancellationToken, int?, bool)
close
public Task<CloseCommandResponse?> Close(CloseCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
CloseCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
Crash(CrashCommandSettings?, CancellationToken, int?, bool)
crash
public Task<CrashCommandResponse?> Crash(CrashCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
CrashCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
CrashGpuProcess(CrashGpuProcessCommandSettings?, CancellationToken, int?, bool)
crashGpuProcess
public Task<CrashGpuProcessCommandResponse?> CrashGpuProcess(CrashGpuProcessCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
CrashGpuProcessCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
ExecuteBrowserCommand(ExecuteBrowserCommandCommandSettings, CancellationToken, int?, bool)
executeBrowserCommand
public Task<ExecuteBrowserCommandCommandResponse?> ExecuteBrowserCommand(ExecuteBrowserCommandCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
ExecuteBrowserCommandCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetBrowserCommandLine(GetBrowserCommandLineCommandSettings?, CancellationToken, int?, bool)
getBrowserCommandLine
public Task<GetBrowserCommandLineCommandResponse> GetBrowserCommandLine(GetBrowserCommandLineCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetBrowserCommandLineCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetHistogram(GetHistogramCommandSettings, CancellationToken, int?, bool)
getHistogram
public Task<GetHistogramCommandResponse> GetHistogram(GetHistogramCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetHistogramCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetHistograms(GetHistogramsCommandSettings, CancellationToken, int?, bool)
getHistograms
public Task<GetHistogramsCommandResponse> GetHistograms(GetHistogramsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetHistogramsCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetVersion(GetVersionCommandSettings?, CancellationToken, int?, bool)
getVersion
public Task<GetVersionCommandResponse> GetVersion(GetVersionCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetVersionCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetWindowBounds(GetWindowBoundsCommandSettings, CancellationToken, int?, bool)
getWindowBounds
public Task<GetWindowBoundsCommandResponse> GetWindowBounds(GetWindowBoundsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetWindowBoundsCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetWindowForTarget(GetWindowForTargetCommandSettings, CancellationToken, int?, bool)
getWindowForTarget
public Task<GetWindowForTargetCommandResponse> GetWindowForTarget(GetWindowForTargetCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetWindowForTargetCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GrantPermissions(GrantPermissionsCommandSettings, CancellationToken, int?, bool)
grantPermissions
public Task<GrantPermissionsCommandResponse?> GrantPermissions(GrantPermissionsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GrantPermissionsCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
ResetPermissions(ResetPermissionsCommandSettings, CancellationToken, int?, bool)
resetPermissions
public Task<ResetPermissionsCommandResponse?> ResetPermissions(ResetPermissionsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
ResetPermissionsCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetDockTile(SetDockTileCommandSettings, CancellationToken, int?, bool)
setDockTile
public Task<SetDockTileCommandResponse?> SetDockTile(SetDockTileCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetDockTileCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetDownloadBehavior(SetDownloadBehaviorCommandSettings, CancellationToken, int?, bool)
setDownloadBehavior
public Task<SetDownloadBehaviorCommandResponse?> SetDownloadBehavior(SetDownloadBehaviorCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetDownloadBehaviorCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetPermission(SetPermissionCommandSettings, CancellationToken, int?, bool)
setPermission
public Task<SetPermissionCommandResponse?> SetPermission(SetPermissionCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetPermissionCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetWindowBounds(SetWindowBoundsCommandSettings, CancellationToken, int?, bool)
setWindowBounds
public Task<SetWindowBoundsCommandResponse?> SetWindowBounds(SetWindowBoundsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetWindowBoundsCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
Events
DownloadProgress
downloadProgress
public event EventHandler<DownloadProgressEventArgs>? DownloadProgress
Event Type
DownloadWillBegin
downloadWillBegin
public event EventHandler<DownloadWillBeginEventArgs>? DownloadWillBegin