com.atlassian.bamboo.pageobjects.utils
Class PageElementFunctions

java.lang.Object
  extended by com.atlassian.bamboo.pageobjects.utils.PageElementFunctions

public final class PageElementFunctions
extends Object

Functions for easier handling of PageElements.

Since:
v3.3

Method Summary
static
<T> com.google.common.base.Function<com.atlassian.pageobjects.elements.PageElement,T>
binder(Class<T> componentClass, com.atlassian.pageobjects.PageBinder binder)
          Deprecated. use binder(PageBinder, Class, Object...)
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.
static com.google.common.base.Function<com.atlassian.pageobjects.elements.PageElement,String> getText()
           
static com.google.common.base.Function<com.atlassian.pageobjects.elements.PageElement,com.atlassian.pageobjects.elements.query.TimedQuery<Boolean>> isPresent()
           
static com.google.common.base.Predicate<com.atlassian.pageobjects.elements.PageElement> isSelected()
           
static com.google.common.base.Supplier<Integer> numberOfWindows(org.openqa.selenium.WebDriver webDriver)
           
static com.google.common.base.Function<com.atlassian.pageobjects.elements.Option,String> optionValue()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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. use binder(PageBinder, Class, Object...)

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 instantiate
binder - 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 instantiate
binder - 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()

getText

public static com.google.common.base.Function<com.atlassian.pageobjects.elements.PageElement,String> getText()

optionValue

public static com.google.common.base.Function<com.atlassian.pageobjects.elements.Option,String> optionValue()

numberOfWindows

public static com.google.common.base.Supplier<Integer> numberOfWindows(org.openqa.selenium.WebDriver webDriver)

isSelected

public static com.google.common.base.Predicate<com.atlassian.pageobjects.elements.PageElement> isSelected()


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.