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

Method GoToUrlAsync

dotnet/src/webdriver/Navigator.cs:99–111  ·  view source on GitHub ↗

Navigate to a url as an asynchronous task. String of where you want the browser to go. A task object representing the asynchronous operation. If is .

(string url)

Source from the content-addressed store, hash-verified

97 /// <returns>A task object representing the asynchronous operation.</returns>
98 /// <exception cref="ArgumentNullException">If <paramref name="url"/> is <see langword="null"/>.</exception>
99 public async Task GoToUrlAsync(string url)
100 {
101 if (url == null)
102 {
103 throw new ArgumentNullException(nameof(url), "URL cannot be null.");
104 }
105
106 Dictionary<string, object?> parameters = new Dictionary<string, object?>
107 {
108 { "url", url }
109 };
110 await this.driver.ExecuteAsync(DriverCommand.Get, parameters).ConfigureAwait(false);
111 }
112
113 /// <summary>
114 /// Navigate to a url.

Calls 2

ExecuteAsyncMethod · 0.45
ToStringMethod · 0.45