Finds all IWebElements within the current context using the given mechanism. The locating mechanism to use. A of all WebElements matching the current criteria, or an empty list if nothing matches. If
(By by)
| 107 | /// matching the current criteria, or an empty list if nothing matches.</returns> |
| 108 | /// <exception cref="ArgumentNullException">If <paramref name="by"/> is <see langword="null"/>.</exception> |
| 109 | public ReadOnlyCollection<IWebElement> FindElements(By by) |
| 110 | { |
| 111 | if (by is null) |
| 112 | { |
| 113 | throw new ArgumentNullException(nameof(by), "by cannot be null"); |
| 114 | } |
| 115 | |
| 116 | Dictionary<string, object?> parameters = new Dictionary<string, object?>(); |
| 117 | parameters.Add("id", this.shadowRootId); |
| 118 | parameters.Add("using", by.Mechanism); |
| 119 | parameters.Add("value", by.Criteria); |
| 120 | |
| 121 | Response commandResponse = this.driver.Execute(DriverCommand.FindShadowChildElements, parameters); |
| 122 | return this.driver.GetElementsFromResponse(commandResponse); |
| 123 | } |
| 124 | |
| 125 | Dictionary<string, object> IWebDriverObjectReference.ToDictionary() |
| 126 | { |
nothing calls this directly
no test coverage detected