Constructor and Description |
---|
NodeMatchers() |
Modifier and Type | Method and Description |
---|---|
static org.hamcrest.Matcher<Node> |
anything()
Creates a matcher that matches everything (
matches(Object) always
returns true. |
static org.hamcrest.Matcher<Node> |
hasChild(String query)
Creates a matcher that matches all
Node s that have at least one node that is found via
NodeQuery.lookup(String) . |
static org.hamcrest.Matcher<Node> |
hasChildren(int amount,
String query)
Creates a matcher that matches all
Node s that have exactly amount nodes that are found via
NodeQuery.lookup(String) . |
static org.hamcrest.Matcher<Node> |
hasText(org.hamcrest.Matcher<String> matcher)
Creates a matcher that matches all
Labeled , TextInputControl ,
and Text objects whose text matches the given matcher . |
static org.hamcrest.Matcher<Node> |
hasText(String string)
Creates a matcher that matches all
Labeled , TextInputControl ,
and Text objects that have the given string . |
static org.hamcrest.Matcher<Node> |
isDisabled()
Creates a matcher that matches all disabled
Node s (i.e. |
static org.hamcrest.Matcher<Node> |
isEnabled()
Creates a matcher that matches all enabled
Node s (i.e. |
static org.hamcrest.Matcher<Node> |
isInvisible()
Creates a matcher that matches all invisible
Node s. |
static org.hamcrest.Matcher<Node> |
isNotNull()
Creates a matcher that matches all non-null
Node s. |
static org.hamcrest.Matcher<Node> |
isNull()
Creates a matcher that matches all null
Node s. |
static org.hamcrest.Matcher<Node> |
isVisible()
Creates a matcher that matches all visible
Node s. |
@Unstable(reason="maybe find a better method name") public static org.hamcrest.Matcher<Node> anything()
matches(Object)
always
returns true.public static org.hamcrest.Matcher<Node> isNull()
Node
s.public static org.hamcrest.Matcher<Node> isNotNull()
Node
s.public static org.hamcrest.Matcher<Node> isVisible()
Node
s.public static org.hamcrest.Matcher<Node> isInvisible()
Node
s.public static org.hamcrest.Matcher<Node> isEnabled()
Node
s (i.e. Node.isDisabled()
returns false).public static org.hamcrest.Matcher<Node> isDisabled()
Node
s (i.e. Node.isDisabled()
returns true).public static org.hamcrest.Matcher<Node> hasText(String string)
Labeled
, TextInputControl
,
and Text
objects that have the given string
.public static org.hamcrest.Matcher<Node> hasText(org.hamcrest.Matcher<String> matcher)
Labeled
, TextInputControl
,
and Text
objects whose text
matches the given matcher
.public static org.hamcrest.Matcher<Node> hasChild(String query)
Node
s that have at least one node that is found via
NodeQuery.lookup(String)
.public static org.hamcrest.Matcher<Node> hasChildren(int amount, String query)
Node
s that have exactly amount
nodes that are found via
NodeQuery.lookup(String)
.