Finds the first using the given method. The locating mechanism to use. The first matching on the current context. If is . If no element matches th
(By by)
| 83 | /// <exception cref="ArgumentNullException">If <paramref name="by"/> is <see langword="null"/>.</exception> |
| 84 | /// <exception cref="NoSuchElementException">If no element matches the criteria.</exception> |
| 85 | public IWebElement FindElement(By by) |
| 86 | { |
| 87 | if (by is null) |
| 88 | { |
| 89 | throw new ArgumentNullException(nameof(by), "by cannot be null"); |
| 90 | } |
| 91 | |
| 92 | Dictionary<string, object?> parameters = new Dictionary<string, object?>(); |
| 93 | parameters.Add("id", this.shadowRootId); |
| 94 | parameters.Add("using", by.Mechanism); |
| 95 | parameters.Add("value", by.Criteria); |
| 96 | |
| 97 | Response commandResponse = this.driver.Execute(DriverCommand.FindShadowChildElement, parameters); |
| 98 | return this.driver.GetElementFromResponse(commandResponse)!; |
| 99 | } |
| 100 | |
| 101 | /// <summary> |
| 102 | /// Finds all <see cref="IWebElement">IWebElements</see> within the current context |
nothing calls this directly
no test coverage detected