Class PageElementFunctions
java.lang.Object
com.atlassian.bamboo.pageobjects.utils.PageElementFunctions
Functions for easier handling of
PageElement
s.- Since:
- v3.3
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> com.google.common.base.Function<com.atlassian.pageobjects.elements.PageElement,
T> Function creating page objects that are components wrapping around page elements.static <T> com.google.common.base.Function<com.atlassian.pageobjects.elements.PageElement,
T> Deprecated.static void
hoverElement
(org.openqa.selenium.WebDriver webDriver, com.atlassian.pageobjects.elements.PageElement pageElement) static com.google.common.base.Function<com.atlassian.pageobjects.elements.PageElement,
com.atlassian.pageobjects.elements.query.TimedQuery<Boolean>> static com.google.common.base.Supplier<Integer>
numberOfWindows
(org.openqa.selenium.WebDriver webDriver) static org.openqa.selenium.WebElement
toWebElement
(com.atlassian.pageobjects.elements.PageElement pageElement)
-
Method Details
-
binder
@Deprecated public static <T> com.google.common.base.Function<com.atlassian.pageobjects.elements.PageElement,T> binder(Class<T> componentClass, com.atlassian.pageobjects.PageBinder binder) Deprecated.Function creating page objects that are components wrapping around page elements. Often we need to return collections of such wrappers and this is where this function comes in handy.- Type Parameters:
T
- type of the page object- Parameters:
componentClass
- class of the page object to instantiatebinder
- page binder- Returns:
- function instantiating the wrapping page objects
-
binder
public static <T> com.google.common.base.Function<com.atlassian.pageobjects.elements.PageElement,T> binder(com.atlassian.pageobjects.PageBinder binder, Class<T> componentClass, Object... args) Function creating page objects that are components wrapping around page elements. Often we need to return collections of such wrappers and this is where this function comes in handy.- Type Parameters:
T
- type of the page object- Parameters:
componentClass
- class of the page object to instantiatebinder
- page binder- Returns:
- function instantiating the wrapping page objects
-
isPresent
public static com.google.common.base.Function<com.atlassian.pageobjects.elements.PageElement,com.atlassian.pageobjects.elements.query.TimedQuery<Boolean>> isPresent() -
numberOfWindows
public static com.google.common.base.Supplier<Integer> numberOfWindows(org.openqa.selenium.WebDriver webDriver) -
toWebElement
public static org.openqa.selenium.WebElement toWebElement(com.atlassian.pageobjects.elements.PageElement pageElement) -
hoverElement
public static void hoverElement(org.openqa.selenium.WebDriver webDriver, com.atlassian.pageobjects.elements.PageElement pageElement)
-
binder(PageBinder, Class, Object...)