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

Method GetBrowserPathAsync

dotnet/src/webdriver/DriverFinder.cs:63–71  ·  view source on GitHub ↗

Gets the path to the browser binary. Discovers the browser path on first call using Selenium Manager. A cancellation token to observe while waiting for the task to complete. A task that represents the asynchronous operation. The task result contains the full path to the browser binary. <exception cref="NoSuchDriverExce

(CancellationToken cancellationToken = default)

Source from the content-addressed store, hash-verified

61 /// <returns>A task that represents the asynchronous operation. The task result contains the full path to the browser binary.</returns>
62 /// <exception cref="NoSuchDriverException">When browser name is not specified or driver/browser cannot be found.</exception>
63 public async ValueTask<string> GetBrowserPathAsync(CancellationToken cancellationToken = default)
64 {
65 if (_browserPath is null)
66 {
67 await DiscoverBinaryPathsAsync(cancellationToken).ConfigureAwait(false);
68 }
69
70 return _browserPath!;
71 }
72
73 private async ValueTask DiscoverBinaryPathsAsync(CancellationToken cancellationToken = default)
74 {

Calls

no outgoing calls

Tested by

no test coverage detected