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)
| 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. |