public class Query
extends java.lang.Object
Predicates
which filter the elements
by their visual properties. HtmlElements
can be found by their location on screen and by their color. Predicates can be
arbitrarily nested and combined with boolean operators.
The Query
can be executed by using the find()
method. In case of AJAX interaction, the findWithWait()
method repeatedly tries to find the elements until a timeout occurs.Constructor and Description |
---|
Query(Browser browser,
Predicate... predicates) |
Query(Browser browser,
Predicates predicates) |
Modifier and Type | Method and Description |
---|---|
void |
addPredicates(Predicate... predicates) |
void |
addPredicates(Predicates predicates) |
HtmlElements |
find()
Finds all elements that match the given predicates.
|
HtmlElement |
findFirst()
Finds all elements that match the given predicates and returns the first result.
|
HtmlElement |
findFirstWithWait()
Finds all elements that match the given predicates and returns the first result.
|
HtmlElements |
findWithWait()
Finds all elements that match the given predicates.
|
Browser |
getBrowser() |
Predicates |
getPredicates() |
java.lang.String |
toString() |
java.lang.String |
toString(int intendationSpaces) |
void |
union(Query... queries) |
public Query(Browser browser, Predicates predicates)
public void addPredicates(Predicates predicates)
public void addPredicates(Predicate... predicates)
public void union(Query... queries)
public Browser getBrowser()
public Predicates getPredicates()
public HtmlElements find()
HtmlElements
resultpublic HtmlElement findFirst()
HtmlElements
resultpublic HtmlElements findWithWait()
HtmlElements
resultpublic HtmlElement findFirstWithWait()
HtmlElements
resultpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(int intendationSpaces)