Interface IBiDiDriverLifecycleManager
- Namespace
- WebDriverBiDi
- Assembly
- WebDriverBiDi.dll
Interface for a driver that manages its lifecycle, including starting and stopping the driver. This interface is implemented by BiDiDriver and can be used for testing, or to allow users to implement their own driver classes. It extends IAsyncDisposable to allow for proper asynchronous disposal of resources.
public interface IBiDiDriverLifecycleManager : IAsyncDisposable
- Inherited Members
Remarks
This interface is not intended to be implemented by users of this library. It is exposed publicly to allow for testing and to allow users to implement their own driver classes if they choose. Normal usage of this library should involve using the BiDiDriver class, which provides a complete implementation. This interface should be used only by advanced users who are implementing custom driver behavior or for testing purposes.
Properties
IsStarted
Gets a value indicating whether the driver has started communication with the remote end of the WebDriver BiDi protocol.
bool IsStarted { get; }
Property Value
Methods
StartAsync(string, CancellationToken)
Asynchronously starts the communication with the remote end of the WebDriver BiDi protocol.
Task StartAsync(string connectionString, CancellationToken cancellationToken = default)
Parameters
connectionStringstringThe connection string to connect to the remote end.
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled.
Returns
- Task
The task object representing the asynchronous operation.
StopAsync(CancellationToken)
Asynchronously stops the communication with the remote end of the WebDriver BiDi protocol.
Task StopAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA cancellation token used to propagate notification that the operation should be canceled.
Returns
- Task
The task object representing the asynchronous operation.
Exceptions
- AggregateException
Thrown when errors were collected during the session under Collect.
- WebDriverBiDiTimeoutException
Thrown when exclusive access to the transport's connection is not obtained within ConnectionLockTimeout.
- OperationCanceledException
Thrown when
cancellationTokenis canceled.