Class BrowsingContextModule
- Namespace
- WebDriverBiDi.BrowsingContext
- Assembly
- WebDriverBiDi.dll
The BrowsingContext module contains commands and events relating to browsing contexts.
public sealed class BrowsingContextModule : Module
- Inheritance
-
BrowsingContextModule
- Inherited Members
Constructors
BrowsingContextModule(IBiDiModuleHost)
Initializes a new instance of the BrowsingContextModule class.
public BrowsingContextModule(IBiDiModuleHost driver)
Parameters
driverIBiDiModuleHostThe IBiDiModuleHost used in the module commands and events.
Fields
BrowsingContextModuleName
The name of the browsingContext module.
public const string BrowsingContextModuleName = "browsingContext"
Field Value
Properties
ModuleName
Gets the module name.
public override string ModuleName { get; }
Property Value
OnContextCreated
Gets an observable event that notifies when a browsing context is created.
[ObservableEventName("browsingContext.contextCreated")]
public ObservableEvent<ContextCreatedEventArgs> OnContextCreated { get; }
Property Value
OnContextDestroyed
Gets an observable event that notifies when a browsing context is destroyed.
[ObservableEventName("browsingContext.contextDestroyed")]
public ObservableEvent<ContextDestroyedEventArgs> OnContextDestroyed { get; }
Property Value
OnDomContentLoaded
Gets an observable event that notifies when the DOM content in a browsing context is loaded.
[ObservableEventName("browsingContext.domContentLoaded")]
public ObservableEvent<NavigationEventArgs> OnDomContentLoaded { get; }
Property Value
OnDownloadEnd
Gets an observable event that notifies when a download has ended.
[ObservableEventName("browsingContext.downloadEnd")]
public ObservableEvent<DownloadEndEventArgs> OnDownloadEnd { get; }
Property Value
OnDownloadWillBegin
Gets an observable event that notifies when a download in a browsing context is about to begin.
[ObservableEventName("browsingContext.downloadWillBegin")]
public ObservableEvent<DownloadWillBeginEventArgs> OnDownloadWillBegin { get; }
Property Value
OnFragmentNavigated
Gets an observable event that notifies when a browsing context fragment is navigated.
[ObservableEventName("browsingContext.fragmentNavigated")]
public ObservableEvent<NavigationEventArgs> OnFragmentNavigated { get; }
Property Value
OnHistoryUpdated
Gets an observable event that notifies when the browser history is updated.
[ObservableEventName("browsingContext.historyUpdated")]
public ObservableEvent<HistoryUpdatedEventArgs> OnHistoryUpdated { get; }
Property Value
OnLoad
Gets an observable event that notifies when the content in a browsing context is loaded.
[ObservableEventName("browsingContext.load")]
public ObservableEvent<NavigationEventArgs> OnLoad { get; }
Property Value
OnNavigationAborted
Gets an observable event that notifies when a browsing context navigation is aborted.
[ObservableEventName("browsingContext.navigationAborted")]
public ObservableEvent<NavigationEventArgs> OnNavigationAborted { get; }
Property Value
OnNavigationCommitted
Gets an observable event that notifies when a browsing context navigation is committed.
[ObservableEventName("browsingContext.navigationCommitted")]
public ObservableEvent<NavigationEventArgs> OnNavigationCommitted { get; }
Property Value
OnNavigationFailed
Gets an observable event that notifies when a browsing context navigation fails.
[ObservableEventName("browsingContext.navigationFailed")]
public ObservableEvent<NavigationEventArgs> OnNavigationFailed { get; }
Property Value
OnNavigationStarted
Gets an observable event that notifies when a browsing context navigation is started.
[ObservableEventName("browsingContext.navigationStarted")]
public ObservableEvent<NavigationEventArgs> OnNavigationStarted { get; }
Property Value
OnUserPromptClosed
Gets an observable event that notifies when a user prompt is closed.
[ObservableEventName("browsingContext.userPromptClosed")]
public ObservableEvent<UserPromptClosedEventArgs> OnUserPromptClosed { get; }
Property Value
OnUserPromptOpened
Gets an observable event that notifies when a user prompt is opened.
[ObservableEventName("browsingContext.userPromptOpened")]
public ObservableEvent<UserPromptOpenedEventArgs> OnUserPromptOpened { get; }
Property Value
Methods
ActivateAsync(ActivateCommandParameters, TimeSpan?, CancellationToken)
Activates a browsing context by bringing it to the foreground.
public Task<ActivateCommandResult> ActivateAsync(ActivateCommandParameters commandParameters, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
commandParametersActivateCommandParametersThe parameters for the command.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled. Omitting this argument is the equivalent of using None.
Returns
- Task<ActivateCommandResult>
An empty command result.
Exceptions
- ArgumentNullException
Thrown when
commandParametersis null.- ArgumentOutOfRangeException
Thrown when
timeoutOverrideis negative (other than InfiniteTimeSpan) or exceeds the maximum supported timer duration.- WebDriverBiDiCommandException
Thrown when the remote end returns an error response for the command.
- WebDriverBiDiSerializationException
Thrown when the command parameters cannot be serialized, or the response cannot be deserialized.
- WebDriverBiDiTimeoutException
Thrown when the command does not complete within the timeout.
- WebDriverBiDiConnectionException
Thrown when the driver is not connected to a remote end, or the connection is lost before the command completes.
- WebDriverBiDiException
Thrown when the command is canceled, or its response carries no result or a result of the wrong type.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.- ObjectDisposedException
Thrown when the driver has been disposed.
CaptureScreenshotAsync(CaptureScreenshotCommandParameters, TimeSpan?, CancellationToken)
Captures a screenshot of the current page in the browsing context.
public Task<CaptureScreenshotCommandResult> CaptureScreenshotAsync(CaptureScreenshotCommandParameters commandParameters, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
commandParametersCaptureScreenshotCommandParametersThe parameters for the command.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled. Omitting this argument is the equivalent of using None.
Returns
- Task<CaptureScreenshotCommandResult>
The result of the command containing a base64-encoded screenshot.
Exceptions
- ArgumentNullException
Thrown when
commandParametersis null.- ArgumentOutOfRangeException
Thrown when
timeoutOverrideis negative (other than InfiniteTimeSpan) or exceeds the maximum supported timer duration.- WebDriverBiDiCommandException
Thrown when the remote end returns an error response for the command.
- WebDriverBiDiSerializationException
Thrown when the command parameters cannot be serialized, or the response cannot be deserialized.
- WebDriverBiDiTimeoutException
Thrown when the command does not complete within the timeout.
- WebDriverBiDiConnectionException
Thrown when the driver is not connected to a remote end, or the connection is lost before the command completes.
- WebDriverBiDiException
Thrown when the command is canceled, or its response carries no result or a result of the wrong type.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.- ObjectDisposedException
Thrown when the driver has been disposed.
CloseAsync(CloseCommandParameters, TimeSpan?, CancellationToken)
Closes the browsing context.
public Task<CloseCommandResult> CloseAsync(CloseCommandParameters commandParameters, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
commandParametersCloseCommandParametersThe parameters for the command.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled. Omitting this argument is the equivalent of using None.
Returns
- Task<CloseCommandResult>
An empty command result.
Exceptions
- ArgumentNullException
Thrown when
commandParametersis null.- ArgumentOutOfRangeException
Thrown when
timeoutOverrideis negative (other than InfiniteTimeSpan) or exceeds the maximum supported timer duration.- WebDriverBiDiCommandException
Thrown when the remote end returns an error response for the command.
- WebDriverBiDiSerializationException
Thrown when the command parameters cannot be serialized, or the response cannot be deserialized.
- WebDriverBiDiTimeoutException
Thrown when the command does not complete within the timeout.
- WebDriverBiDiConnectionException
Thrown when the driver is not connected to a remote end, or the connection is lost before the command completes.
- WebDriverBiDiException
Thrown when the command is canceled, or its response carries no result or a result of the wrong type.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.- ObjectDisposedException
Thrown when the driver has been disposed.
CreateAsync(CreateCommandParameters, TimeSpan?, CancellationToken)
Creates a new browsing context.
public Task<CreateCommandResult> CreateAsync(CreateCommandParameters commandParameters, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
commandParametersCreateCommandParametersThe parameters for the command.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled. Omitting this argument is the equivalent of using None.
Returns
- Task<CreateCommandResult>
The result of the command including the ID of the new context.
Exceptions
- ArgumentNullException
Thrown when
commandParametersis null.- ArgumentOutOfRangeException
Thrown when
timeoutOverrideis negative (other than InfiniteTimeSpan) or exceeds the maximum supported timer duration.- WebDriverBiDiCommandException
Thrown when the remote end returns an error response for the command.
- WebDriverBiDiSerializationException
Thrown when the command parameters cannot be serialized, or the response cannot be deserialized.
- WebDriverBiDiTimeoutException
Thrown when the command does not complete within the timeout.
- WebDriverBiDiConnectionException
Thrown when the driver is not connected to a remote end, or the connection is lost before the command completes.
- WebDriverBiDiException
Thrown when the command is canceled, or its response carries no result or a result of the wrong type.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.- ObjectDisposedException
Thrown when the driver has been disposed.
GetTreeAsync(GetTreeCommandParameters?, TimeSpan?, CancellationToken)
Gets a tree of browsing contexts associated with a specified context.
public Task<GetTreeCommandResult> GetTreeAsync(GetTreeCommandParameters? commandParameters = null, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
commandParametersGetTreeCommandParametersThe parameters for the command. If omitted, or if null, the command is sent with default parameters.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled. Omitting this argument is the equivalent of using None.
Returns
- Task<GetTreeCommandResult>
The tree of associated browsing contexts.
Exceptions
- ArgumentOutOfRangeException
Thrown when
timeoutOverrideis negative (other than InfiniteTimeSpan) or exceeds the maximum supported timer duration.- WebDriverBiDiCommandException
Thrown when the remote end returns an error response for the command.
- WebDriverBiDiSerializationException
Thrown when the command parameters cannot be serialized, or the response cannot be deserialized.
- WebDriverBiDiTimeoutException
Thrown when the command does not complete within the timeout.
- WebDriverBiDiConnectionException
Thrown when the driver is not connected to a remote end, or the connection is lost before the command completes.
- WebDriverBiDiException
Thrown when the command is canceled, or its response carries no result or a result of the wrong type.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.- ObjectDisposedException
Thrown when the driver has been disposed.
HandleUserPromptAsync(HandleUserPromptCommandParameters, TimeSpan?, CancellationToken)
Handles a user prompt.
public Task<HandleUserPromptCommandResult> HandleUserPromptAsync(HandleUserPromptCommandParameters commandParameters, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
commandParametersHandleUserPromptCommandParametersThe parameters for the command.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled. Omitting this argument is the equivalent of using None.
Returns
- Task<HandleUserPromptCommandResult>
An empty command result.
Exceptions
- ArgumentNullException
Thrown when
commandParametersis null.- ArgumentOutOfRangeException
Thrown when
timeoutOverrideis negative (other than InfiniteTimeSpan) or exceeds the maximum supported timer duration.- WebDriverBiDiCommandException
Thrown when the remote end returns an error response for the command.
- WebDriverBiDiSerializationException
Thrown when the command parameters cannot be serialized, or the response cannot be deserialized.
- WebDriverBiDiTimeoutException
Thrown when the command does not complete within the timeout.
- WebDriverBiDiConnectionException
Thrown when the driver is not connected to a remote end, or the connection is lost before the command completes.
- WebDriverBiDiException
Thrown when the command is canceled, or its response carries no result or a result of the wrong type.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.- ObjectDisposedException
Thrown when the driver has been disposed.
LocateNodesAsync(LocateNodesCommandParameters, TimeSpan?, CancellationToken)
Locates nodes within a browsing context.
public Task<LocateNodesCommandResult> LocateNodesAsync(LocateNodesCommandParameters commandParameters, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
commandParametersLocateNodesCommandParametersThe parameters for the command.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled. Omitting this argument is the equivalent of using None.
Returns
- Task<LocateNodesCommandResult>
The result of the command containing the located nodes, if any.
Exceptions
- ArgumentNullException
Thrown when
commandParametersis null.- ArgumentOutOfRangeException
Thrown when
timeoutOverrideis negative (other than InfiniteTimeSpan) or exceeds the maximum supported timer duration.- WebDriverBiDiCommandException
Thrown when the remote end returns an error response for the command.
- WebDriverBiDiSerializationException
Thrown when the command parameters cannot be serialized, or the response cannot be deserialized.
- WebDriverBiDiTimeoutException
Thrown when the command does not complete within the timeout.
- WebDriverBiDiConnectionException
Thrown when the driver is not connected to a remote end, or the connection is lost before the command completes.
- WebDriverBiDiException
Thrown when the command is canceled, or its response carries no result or a result of the wrong type.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.- ObjectDisposedException
Thrown when the driver has been disposed.
NavigateAsync(NavigateCommandParameters, TimeSpan?, CancellationToken)
Navigates a browsing context to a new URL.
public Task<NavigateCommandResult> NavigateAsync(NavigateCommandParameters commandParameters, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
commandParametersNavigateCommandParametersThe parameters for the command.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled. Omitting this argument is the equivalent of using None.
Returns
- Task<NavigateCommandResult>
The result of the command.
Exceptions
- ArgumentNullException
Thrown when
commandParametersis null.- ArgumentOutOfRangeException
Thrown when
timeoutOverrideis negative (other than InfiniteTimeSpan) or exceeds the maximum supported timer duration.- WebDriverBiDiCommandException
Thrown when the remote end returns an error response for the command.
- WebDriverBiDiSerializationException
Thrown when the command parameters cannot be serialized, or the response cannot be deserialized.
- WebDriverBiDiTimeoutException
Thrown when the command does not complete within the timeout.
- WebDriverBiDiConnectionException
Thrown when the driver is not connected to a remote end, or the connection is lost before the command completes.
- WebDriverBiDiException
Thrown when the command is canceled, or its response carries no result or a result of the wrong type.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.- ObjectDisposedException
Thrown when the driver has been disposed.
PrintAsync(PrintCommandParameters, TimeSpan?, CancellationToken)
Prints a PDF of the current page in the browsing context.
public Task<PrintCommandResult> PrintAsync(PrintCommandParameters commandParameters, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
commandParametersPrintCommandParametersThe parameters for the command.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled. Omitting this argument is the equivalent of using None.
Returns
- Task<PrintCommandResult>
The result of the command containing a base64-encoded PDF of the current page.
Exceptions
- ArgumentNullException
Thrown when
commandParametersis null.- ArgumentOutOfRangeException
Thrown when
timeoutOverrideis negative (other than InfiniteTimeSpan) or exceeds the maximum supported timer duration.- WebDriverBiDiCommandException
Thrown when the remote end returns an error response for the command.
- WebDriverBiDiSerializationException
Thrown when the command parameters cannot be serialized, or the response cannot be deserialized.
- WebDriverBiDiTimeoutException
Thrown when the command does not complete within the timeout.
- WebDriverBiDiConnectionException
Thrown when the driver is not connected to a remote end, or the connection is lost before the command completes.
- WebDriverBiDiException
Thrown when the command is canceled, or its response carries no result or a result of the wrong type.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.- ObjectDisposedException
Thrown when the driver has been disposed.
ReloadAsync(ReloadCommandParameters, TimeSpan?, CancellationToken)
Reloads the current document of a browsing context.
public Task<ReloadCommandResult> ReloadAsync(ReloadCommandParameters commandParameters, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
commandParametersReloadCommandParametersThe parameters for the command.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled. Omitting this argument is the equivalent of using None.
Returns
- Task<ReloadCommandResult>
The result of the command.
Exceptions
- ArgumentNullException
Thrown when
commandParametersis null.- ArgumentOutOfRangeException
Thrown when
timeoutOverrideis negative (other than InfiniteTimeSpan) or exceeds the maximum supported timer duration.- WebDriverBiDiCommandException
Thrown when the remote end returns an error response for the command.
- WebDriverBiDiSerializationException
Thrown when the command parameters cannot be serialized, or the response cannot be deserialized.
- WebDriverBiDiTimeoutException
Thrown when the command does not complete within the timeout.
- WebDriverBiDiConnectionException
Thrown when the driver is not connected to a remote end, or the connection is lost before the command completes.
- WebDriverBiDiException
Thrown when the command is canceled, or its response carries no result or a result of the wrong type.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.- ObjectDisposedException
Thrown when the driver has been disposed.
SetBypassCSPAsync(SetBypassCSPCommandParameters, TimeSpan?, CancellationToken)
Sets whether to bypass content security policies (CSP) for a browsing context.
public Task<SetBypassCSPCommandResult> SetBypassCSPAsync(SetBypassCSPCommandParameters commandParameters, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
commandParametersSetBypassCSPCommandParametersThe parameters for the command.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled. Omitting this argument is the equivalent of using None.
Returns
- Task<SetBypassCSPCommandResult>
The result of the command.
Exceptions
- ArgumentNullException
Thrown when
commandParametersis null.- ArgumentOutOfRangeException
Thrown when
timeoutOverrideis negative (other than InfiniteTimeSpan) or exceeds the maximum supported timer duration.- WebDriverBiDiCommandException
Thrown when the remote end returns an error response for the command.
- WebDriverBiDiSerializationException
Thrown when the command parameters cannot be serialized, or the response cannot be deserialized.
- WebDriverBiDiTimeoutException
Thrown when the command does not complete within the timeout.
- WebDriverBiDiConnectionException
Thrown when the driver is not connected to a remote end, or the connection is lost before the command completes.
- WebDriverBiDiException
Thrown when the command is canceled, or its response carries no result or a result of the wrong type.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.- ObjectDisposedException
Thrown when the driver has been disposed.
SetViewportAsync(SetViewportCommandParameters, TimeSpan?, CancellationToken)
Sets the viewport of a browsing context to the specified dimensions.
public Task<SetViewportCommandResult> SetViewportAsync(SetViewportCommandParameters commandParameters, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
commandParametersSetViewportCommandParametersThe parameters for the command.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled. Omitting this argument is the equivalent of using None.
Returns
- Task<SetViewportCommandResult>
The result of the command.
Exceptions
- ArgumentNullException
Thrown when
commandParametersis null.- ArgumentOutOfRangeException
Thrown when
timeoutOverrideis negative (other than InfiniteTimeSpan) or exceeds the maximum supported timer duration.- WebDriverBiDiCommandException
Thrown when the remote end returns an error response for the command.
- WebDriverBiDiSerializationException
Thrown when the command parameters cannot be serialized, or the response cannot be deserialized.
- WebDriverBiDiTimeoutException
Thrown when the command does not complete within the timeout.
- WebDriverBiDiConnectionException
Thrown when the driver is not connected to a remote end, or the connection is lost before the command completes.
- WebDriverBiDiException
Thrown when the command is canceled, or its response carries no result or a result of the wrong type.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.- ObjectDisposedException
Thrown when the driver has been disposed.
StartScreencastAsync(StartScreencastCommandParameters, TimeSpan?, CancellationToken)
Starts capture of a screencast for a browsing context.
public Task<StartScreencastCommandResult> StartScreencastAsync(StartScreencastCommandParameters commandParameters, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
commandParametersStartScreencastCommandParametersThe parameters for the command.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled. Omitting this argument is the equivalent of using None.
Returns
- Task<StartScreencastCommandResult>
The result of the command.
Exceptions
- ArgumentNullException
Thrown when
commandParametersis null.- ArgumentOutOfRangeException
Thrown when
timeoutOverrideis negative (other than InfiniteTimeSpan) or exceeds the maximum supported timer duration.- WebDriverBiDiCommandException
Thrown when the remote end returns an error response for the command.
- WebDriverBiDiSerializationException
Thrown when the command parameters cannot be serialized, or the response cannot be deserialized.
- WebDriverBiDiTimeoutException
Thrown when the command does not complete within the timeout.
- WebDriverBiDiConnectionException
Thrown when the driver is not connected to a remote end, or the connection is lost before the command completes.
- WebDriverBiDiException
Thrown when the command is canceled, or its response carries no result or a result of the wrong type.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.- ObjectDisposedException
Thrown when the driver has been disposed.
StopScreencastAsync(StopScreencastCommandParameters, TimeSpan?, CancellationToken)
Stops capture of a screencast for a browsing context.
public Task<StopScreencastCommandResult> StopScreencastAsync(StopScreencastCommandParameters commandParameters, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
commandParametersStopScreencastCommandParametersThe parameters for the command.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled. Omitting this argument is the equivalent of using None.
Returns
- Task<StopScreencastCommandResult>
The result of the command.
Exceptions
- ArgumentNullException
Thrown when
commandParametersis null.- ArgumentOutOfRangeException
Thrown when
timeoutOverrideis negative (other than InfiniteTimeSpan) or exceeds the maximum supported timer duration.- WebDriverBiDiCommandException
Thrown when the remote end returns an error response for the command.
- WebDriverBiDiSerializationException
Thrown when the command parameters cannot be serialized, or the response cannot be deserialized.
- WebDriverBiDiTimeoutException
Thrown when the command does not complete within the timeout.
- WebDriverBiDiConnectionException
Thrown when the driver is not connected to a remote end, or the connection is lost before the command completes.
- WebDriverBiDiException
Thrown when the command is canceled, or its response carries no result or a result of the wrong type.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.- ObjectDisposedException
Thrown when the driver has been disposed.
TraverseHistoryAsync(TraverseHistoryCommandParameters, TimeSpan?, CancellationToken)
Traverses the history entries of a specific browsing context.
public Task<TraverseHistoryCommandResult> TraverseHistoryAsync(TraverseHistoryCommandParameters commandParameters, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
commandParametersTraverseHistoryCommandParametersThe parameters for the command.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled. Omitting this argument is the equivalent of using None.
Returns
- Task<TraverseHistoryCommandResult>
The result of the command.
Exceptions
- ArgumentNullException
Thrown when
commandParametersis null.- ArgumentOutOfRangeException
Thrown when
timeoutOverrideis negative (other than InfiniteTimeSpan) or exceeds the maximum supported timer duration.- WebDriverBiDiCommandException
Thrown when the remote end returns an error response for the command.
- WebDriverBiDiSerializationException
Thrown when the command parameters cannot be serialized, or the response cannot be deserialized.
- WebDriverBiDiTimeoutException
Thrown when the command does not complete within the timeout.
- WebDriverBiDiConnectionException
Thrown when the driver is not connected to a remote end, or the connection is lost before the command completes.
- WebDriverBiDiException
Thrown when the command is canceled, or its response carries no result or a result of the wrong type.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.- ObjectDisposedException
Thrown when the driver has been disposed.