public class WebDriverElementQuery<E extends PageElement> extends AbstractSearchQuery<E,PageElementQuery<E>> implements PageElementQuery<E>
| Modifier and Type | Field and Description |
|---|---|
protected Class<E> |
pageElementClass |
protected TimeoutType |
timeoutType |
protected org.openqa.selenium.WebDriver |
webDriver |
pageBinder, querySupplier, timeouts| Constructor and Description |
|---|
WebDriverElementQuery(com.google.common.base.Supplier<Iterable<E>> querySupplier,
Class<E> pageElementClass,
TimeoutType timeoutType) |
| Modifier and Type | Method and Description |
|---|---|
<PE extends E> |
as(Class<PE> pageElementClass)
Map current results to a more specialized
pageElementClass (e.g. |
PageElementQuery<E> |
by(org.openqa.selenium.By by)
Search withing all results for child elements matching
by. |
PageElementQuery<E> |
by(org.openqa.selenium.By by,
com.google.common.base.Predicate<? super PageElement> filter)
Search child elements using
by and applying the filter at the same time. |
protected <F> AnyQuery<F> |
newAnyQueryInstance(com.google.common.base.Supplier<Iterable<F>> supplier) |
protected PageElementQuery<E> |
newInstance(com.google.common.base.Supplier<Iterable<E>> supplier) |
PageElementQuery<E> |
withTimeout(TimeoutType timeoutType)
Apply a custom
timeoutType to all resulting elements. |
bindTo, filter, first, flatMap, flatMapSupplier, get, hasResult, map, mapSupplier, now, timedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait@Inject protected org.openqa.selenium.WebDriver webDriver
protected final Class<E extends PageElement> pageElementClass
protected final TimeoutType timeoutType
@Nonnull public PageElementQuery<E> by(@Nonnull org.openqa.selenium.By by)
PageElementQueryby. This is technically a flat map that will
expand each current result element into a set of child elements matching by.by in interface PageElementQuery<E extends PageElement>by - locator to search byby@Nonnull public PageElementQuery<E> by(@Nonnull org.openqa.selenium.By by, @Nonnull com.google.common.base.Predicate<? super PageElement> filter)
PageElementQueryby and applying the filter at the same time. This is equivalent to
calling PageElementQuery.by(By) and SearchQuery.filter(Predicate) in succession.by in interface PageElementQuery<E extends PageElement>by - locator to search byfilter - filter for the results of the searchby and filtered using filter@Nonnull public PageElementQuery<E> withTimeout(@Nonnull TimeoutType timeoutType)
PageElementQuerytimeoutType to all resulting elements.withTimeout in interface PageElementQuery<E extends PageElement>timeoutType - new timeout type@Nonnull public <PE extends E> PageElementQuery<PE> as(@Nonnull Class<PE> pageElementClass)
PageElementQuerypageElementClass (e.g. CheckboxElement).as in interface PageElementQuery<E extends PageElement>PE - the new element type parameterpageElementClass - the page element class to applypageElementClass@Nonnull protected <F> AnyQuery<F> newAnyQueryInstance(@Nonnull com.google.common.base.Supplier<Iterable<F>> supplier)
newAnyQueryInstance in class AbstractSearchQuery<E extends PageElement,PageElementQuery<E extends PageElement>>@Nonnull protected PageElementQuery<E> newInstance(@Nonnull com.google.common.base.Supplier<Iterable<E>> supplier)
newInstance in class AbstractSearchQuery<E extends PageElement,PageElementQuery<E extends PageElement>>Copyright © 2015 Atlassian. All rights reserved.