public interface SearchContext
| 限定符和类型 | 方法和说明 |
|---|---|
WebElement |
findElement(By by)
Find the first
WebElement using the given method. |
List<WebElement> |
findElements(By by)
Find all elements within the current context using the given mechanism.
|
List<WebElement> findElements(By by)
by - The locating mechanism to useWebElements, or an empty list if nothing matchesByWebElement findElement(By by)
WebElement using the given method.by - The locating mechanismNoSuchElementException - If no matching elements are found