Package com.codeborne.selenide.impl
Class ElementFinder
java.lang.Object
com.codeborne.selenide.impl.WebElementSource
com.codeborne.selenide.impl.ElementFinder
-
Constructor Summary
ConstructorDescriptionElementFinder
(Driver driver, WebElementSource parent, org.openqa.selenium.By criteria, int index, String alias) -
Method Summary
Modifier and TypeMethodDescriptioncreateElementNotFoundError
(WebElementCondition condition, Throwable cause) driver()
find
(SelenideElement proxy, Object arg, int index) List<org.openqa.selenium.WebElement>
findAll()
org.openqa.selenium.WebElement
toString()
static SelenideElement
wrap
(Driver driver, WebElementSource parent, org.openqa.selenium.By criteria, int index) static <T extends SelenideElement>
Twrap
(Driver driver, Class<T> clazz, WebElementSource parent, org.openqa.selenium.By criteria, int index) static <T extends SelenideElement>
Twrap
(Driver driver, Class<T> clazz, WebElementSource parent, org.openqa.selenium.By criteria, int index, String alias) static SelenideElement
static SelenideElement
static <T extends SelenideElement>
Twrap
(Class<T> clazz, WebElementSource element) Methods inherited from class com.codeborne.selenide.impl.WebElementSource
checkCondition, description, findAndAssertElementIsClickable, findAndAssertElementIsEditable, findAndAssertElementIsInteractable, findAndAssertElementIsVisible, getAlias, getSelector, setAlias
-
Constructor Details
-
ElementFinder
public ElementFinder(Driver driver, @Nullable WebElementSource parent, org.openqa.selenium.By criteria, int index, @Nullable String alias)
-
-
Method Details
-
wrap
@CheckReturnValue @Nonnull public static SelenideElement wrap(Driver driver, String cssSelector, int index) -
wrap
@CheckReturnValue @Nonnull public static SelenideElement wrap(Driver driver, org.openqa.selenium.By criteria) -
wrap
@CheckReturnValue @Nonnull public static SelenideElement wrap(Driver driver, @Nullable WebElementSource parent, org.openqa.selenium.By criteria, int index) -
wrap
@CheckReturnValue @Nonnull public static <T extends SelenideElement> T wrap(Driver driver, Class<T> clazz, @Nullable WebElementSource parent, org.openqa.selenium.By criteria, int index) -
wrap
@CheckReturnValue @Nonnull public static <T extends SelenideElement> T wrap(Driver driver, Class<T> clazz, @Nullable WebElementSource parent, org.openqa.selenium.By criteria, int index, @Nullable String alias) -
wrap
@CheckReturnValue @Nonnull public static <T extends SelenideElement> T wrap(Class<T> clazz, WebElementSource element) -
find
@CheckReturnValue @Nonnull public SelenideElement find(SelenideElement proxy, Object arg, int index) - Overrides:
find
in classWebElementSource
-
driver
- Specified by:
driver
in classWebElementSource
-
getWebElement
@CheckReturnValue @Nonnull public org.openqa.selenium.WebElement getWebElement() throws org.openqa.selenium.NoSuchElementException, IndexOutOfBoundsException- Specified by:
getWebElement
in classWebElementSource
- Throws:
org.openqa.selenium.NoSuchElementException
IndexOutOfBoundsException
-
findAll
@CheckReturnValue @Nonnull public List<org.openqa.selenium.WebElement> findAll() throws org.openqa.selenium.NoSuchElementException, IndexOutOfBoundsException- Overrides:
findAll
in classWebElementSource
- Throws:
org.openqa.selenium.NoSuchElementException
IndexOutOfBoundsException
-
createElementNotFoundError
@CheckReturnValue @Nonnull public ElementNotFound createElementNotFoundError(WebElementCondition condition, Throwable cause) - Overrides:
createElementNotFoundError
in classWebElementSource
-
getSearchCriteria
- Specified by:
getSearchCriteria
in classWebElementSource
-
toString
- Overrides:
toString
in classWebElementSource
-