Finds all elements matching the criteria. An object to use to search for the elements. A of all WebElements matching the current criteria, or an empty list if nothing matches.
(ISearchContext context)
| 338 | /// <returns>A <see cref="ReadOnlyCollection{T}"/> of all <see cref="IWebElement">WebElements</see> |
| 339 | /// matching the current criteria, or an empty list if nothing matches.</returns> |
| 340 | public virtual ReadOnlyCollection<IWebElement> FindElements(ISearchContext context) |
| 341 | { |
| 342 | if (this.FindElementsMethod is not { } findElementsMethod) |
| 343 | { |
| 344 | throw new InvalidOperationException("FindElements method not set. Override the By.FindElements method, set the By.FindElementsMethod property, or use a constructor that sets a query mechanism."); |
| 345 | } |
| 346 | |
| 347 | return findElementsMethod(context); |
| 348 | } |
| 349 | |
| 350 | /// <summary> |
| 351 | /// Gets a string representation of the finder. |
no outgoing calls
no test coverage detected