Asynchronously performs the core dispose logic. A task representing the asynchronous dispose operation.
()
| 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 | { |
no test coverage detected