public class ElementFinder extends Object implements IElementFinder
| Constructor and Description |
|---|
ElementFinder(ILocalizedLogger localizedLogger,
IConditionalWait conditionalWait) |
| Modifier and Type | Method and Description |
|---|---|
List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.By locator,
DesiredState desiredState,
Duration timeout)
Finds elements in state defined by
DesiredState. |
protected void |
handleTimeoutException(org.openqa.selenium.TimeoutException exception,
org.openqa.selenium.By locator,
DesiredState desiredState,
boolean wasAnyElementFound)
depends on configuration of DesiredState object it can be required to throw or not NoSuchElementException
|
protected boolean |
tryToFindElements(org.openqa.selenium.By locator,
DesiredState desiredState,
AtomicBoolean wasAnyElementFound,
List<org.openqa.selenium.WebElement> resultElements,
org.openqa.selenium.SearchContext context) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindElement, findElement, findElement, findElement, findElement, findElement, findElements, findElements, findElements, findElements, findElements, findElements, findElements, resolveState@Inject public ElementFinder(ILocalizedLogger localizedLogger, IConditionalWait conditionalWait)
public List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By locator, DesiredState desiredState, Duration timeout)
IElementFinderDesiredState.findElements in interface IElementFinderlocator - elements locatordesiredState - object with predicate to define element statetimeout - timeout for searchprotected boolean tryToFindElements(org.openqa.selenium.By locator,
DesiredState desiredState,
AtomicBoolean wasAnyElementFound,
List<org.openqa.selenium.WebElement> resultElements,
org.openqa.selenium.SearchContext context)
protected void handleTimeoutException(org.openqa.selenium.TimeoutException exception,
org.openqa.selenium.By locator,
DesiredState desiredState,
boolean wasAnyElementFound)
exception - TimeoutException to handlelocator - locator that is using to find elementsdesiredState - DesiredState objectwasAnyElementFound - was any element found by locator or not.Copyright © 2020. All rights reserved.