MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / DisposeAsyncCore

Method DisposeAsyncCore

dotnet/src/webdriver/WebDriver.cs:768–792  ·  view source on GitHub ↗

Asynchronously performs the core dispose logic. A task representing the asynchronous dispose operation.

()

Source from the content-addressed store, hash-verified

766 /// </summary>
767 /// <returns>A task representing the asynchronous dispose operation.</returns>
768 protected virtual async ValueTask DisposeAsyncCore()
769 {
770 if (this.SessionId is not null)
771 {
772 try
773 {
774 await this.ExecuteAsync(DriverCommand.Quit, null).ConfigureAwait(false);
775 }
776 catch (NotImplementedException)
777 {
778 }
779 catch (InvalidOperationException)
780 {
781 }
782 catch (WebDriverException)
783 {
784 }
785 finally
786 {
787 this.SessionId = null!;
788 }
789 }
790
791 this.CommandExecutor.Dispose();
792 }
793
794 private static void UnpackAndThrowOnError(Response errorResponse, string commandToExecute)
795 {

Callers 1

DisposeAsyncMethod · 0.95

Calls 2

ExecuteAsyncMethod · 0.95
DisposeMethod · 0.45

Tested by

no test coverage detected