public class NodeLocator extends AbstractLocator
Locator
that uses the provided Node
as the source of text. This is useful when iterating a array of nodes from another locator and
being able to transform each found Node into another Locator.
NOTE : Locator
s are one shot objects. A call to Locator.getNodes()
should return the same Nodes every time it is called. Even if the underlying
data source has changed (for example the WebTester page has changed) the Locator
MUST return the same data.
AbstractLocator.LocatorTextOperation
nodes, originalWebResponse, tester
Constructor and Description |
---|
NodeLocator(Node node) |
Modifier and Type | Method and Description |
---|---|
Node[] |
getNodes()
A
Locator may return 0 nodes, 1 node or multiple nodes. |
String |
toString()
A meaningful "debugging" representation of this Locator to help when test fail.
|
allMatches, betterNode, containsNode, exists, getDOM, getHTML, getHTML, getNode, getNodesTextImpl, getNodeTextImpl, getRawText, getRawText, getText, getText, getWebResponse, hasNodes, iterator, toStringImpl
public NodeLocator(Node node)
public Node[] getNodes()
Locator
Locator
may return 0 nodes, 1 node or multiple nodes.
Copyright © 2002-2023 Atlassian. All Rights Reserved.