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

Method FindElement

dotnet/src/webdriver/WebElement.cs:333–341  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

331 /// <exception cref="ArgumentNullException">If <paramref name="by"/> is <see langword="null"/>.</exception>
332 /// <exception cref="NoSuchElementException">If no element matches the criteria.</exception>
333 public virtual IWebElement FindElement(By by)
334 {
335 if (by == null)
336 {
337 throw new ArgumentNullException(nameof(@by), "by cannot be null");
338 }
339
340 return by.FindElement(this);
341 }
342
343 /// <summary>
344 /// Finds a child element matching the given mechanism and value.

Callers

nothing calls this directly

Calls 3

ExecuteMethod · 0.95
AddMethod · 0.45

Tested by

no test coverage detected