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

Method DisposeAsyncCore

dotnet/src/webdriver/WebDriver.cs:710–734  ·  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

708 /// </summary>
709 /// <returns>A task representing the asynchronous dispose operation.</returns>
710 protected virtual async ValueTask DisposeAsyncCore()
711 {
712 if (this.SessionId is not null)
713 {
714 try
715 {
716 await this.ExecuteAsync(DriverCommand.Quit, null).ConfigureAwait(false);
717 }
718 catch (NotImplementedException)
719 {
720 }
721 catch (InvalidOperationException)
722 {
723 }
724 catch (WebDriverException)
725 {
726 }
727 finally
728 {
729 this.SessionId = null!;
730 }
731 }
732
733 this.CommandExecutor.Dispose();
734 }
735
736 private static void UnpackAndThrowOnError(Response errorResponse, string commandToExecute)
737 {

Callers 1

DisposeAsyncMethod · 0.95

Calls 2

ExecuteAsyncMethod · 0.95
DisposeMethod · 0.45

Tested by

no test coverage detected