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

Method GetDriverPathAsync

dotnet/src/webdriver/DriverFinder.cs:46–54  ·  view source on GitHub ↗

Gets the path to the browser driver executable. Discovers the driver 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 driver executable. <exception cref="NoS

(CancellationToken cancellationToken = default)

Source from the content-addressed store, hash-verified

44 /// <returns>A task that represents the asynchronous operation. The task result contains the full path to the driver executable.</returns>
45 /// <exception cref="NoSuchDriverException">When browser name is not specified or driver/browser cannot be found.</exception>
46 public async ValueTask<string> GetDriverPathAsync(CancellationToken cancellationToken = default)
47 {
48 if (_driverPath is null)
49 {
50 await DiscoverBinaryPathsAsync(cancellationToken).ConfigureAwait(false);
51 }
52
53 return _driverPath!;
54 }
55
56 /// <summary>
57 /// Gets the path to the browser binary.

Calls

no outgoing calls

Tested by

no test coverage detected