public final class

PageElements

extends Object
java.lang.Object
   ↳ com.atlassian.jira.pageobjects.framework.elements.PageElements

Class Overview

Predicates and functions for page elements.

Summary

Constants
String BODY
String TD
String TR
Fields
public static Function<PageElement, String> TEXT
Public Methods
static List<String> asText(Iterable<? extends PageElement> elements)
Turn some page elements into a list with their text content.
static <P> Function<PageElement, P> bind(PageBinder binder, Class<P> pageObjectClass)
Binds 'simple' page objects that take one constructor parameter (page elements), e.g.
static Function<PageElement, String> getAttribute(String attributeName)
static Predicate<PageElement> hasClass(String className)
static Predicate<PageElement> hasDataAttribute(String attribute)
static Predicate<PageElement> hasDataAttribute(String attribute, String value)
static Predicate<PageElement> hasValue(String value)
static Predicate<PageElement> isVisible()
static <P> Iterable<P> transform(PageBinder binder, Iterable<PageElement> pageElements, Class<P> pageObjectClass)
Transforms a list of page elements into a list of page objects wrapping those elements.
static <P> TimedQuery<Iterable<P>> transformTimed(Timeouts timeouts, PageBinder binder, Supplier<Iterable<PageElement>> pageElements, Class<P> pageObjectClass)
A transform that returns a timed query yaaay.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String BODY

Constant Value: "body"

public static final String TD

Constant Value: "td"

public static final String TR

Constant Value: "tr"

Fields

public static Function<PageElement, String> TEXT

Public Methods

public static List<String> asText (Iterable<? extends PageElement> elements)

Turn some page elements into a list with their text content.

Parameters
elements the elements to convert.
Returns
  • a list with the text content of the nodes.

public static Function<PageElement, P> bind (PageBinder binder, Class<P> pageObjectClass)

Binds 'simple' page objects that take one constructor parameter (page elements), e.g. table rows etc.

Parameters
binder page binder
pageObjectClass target page object class
Returns
  • page binding function

public static Function<PageElement, String> getAttribute (String attributeName)

public static Predicate<PageElement> hasClass (String className)

public static Predicate<PageElement> hasDataAttribute (String attribute)

public static Predicate<PageElement> hasDataAttribute (String attribute, String value)

public static Predicate<PageElement> hasValue (String value)

public static Predicate<PageElement> isVisible ()

public static Iterable<P> transform (PageBinder binder, Iterable<PageElement> pageElements, Class<P> pageObjectClass)

Transforms a list of page elements into a list of page objects wrapping those elements.

Parameters
binder page binder
pageElements a list of page elements to transform
pageObjectClass target page object class
Returns
  • a list of page element wrappers

public static TimedQuery<Iterable<P>> transformTimed (Timeouts timeouts, PageBinder binder, Supplier<Iterable<PageElement>> pageElements, Class<P> pageObjectClass)

A transform that returns a timed query yaaay.

Parameters
timeouts timeouts
binder page binder
pageElements a list of page elements to transform
pageObjectClass target page object class
Returns
  • a query for a list of page element wrappers