public class CssLocator extends AbstractLocator implements Locator
The CSS selectors are therefore the set that JSOUP can handle.
See {@link org.jsoup.select.Selector} for the supported CSS selectors
At present it is a subset of jQuery CSS support so be a bit careful with the more tricky selectors
AbstractLocator.LocatorTextOperation
nodes, originalWebResponse, tester
Constructor and Description |
---|
CssLocator(Node startNode,
String cssSelector)
|
CssLocator(net.sourceforge.jwebunit.WebTester tester,
String cssSelector)
Locates
Node 's using the specified WebTester |
Modifier and Type | Method and Description |
---|---|
protected Node |
betterNode(Node node) |
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, containsNode, exists, getDOM, getHTML, getHTML, getNode, getNodesTextImpl, getNodeTextImpl, getRawText, getRawText, getText, getText, getWebResponse, hasNodes, iterator, toStringImpl
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
allMatches, exists, getHTML, getHTML, getNode, getRawText, getRawText, getText, getText, hasNodes, iterator
public CssLocator(net.sourceforge.jwebunit.WebTester tester, String cssSelector)
Node
's using the specified WebTester
tester
- the WebTester in playcssSelector
- the CSS selector stringpublic CssLocator(Node startNode, String cssSelector)
Node
's starting from the specified Node
The start node can ONLY be a node given out previous by another CssLocator. It will throw and IllegalArgumentException if you give it any other type of Node.
startNode
- the Node
to start at.cssSelector
- the CSS selector stringpublic Node[] getNodes()
Locator
Locator
may return 0 nodes, 1 node or multiple nodes.
public String toString()
Locator
protected Node betterNode(Node node)
betterNode
in class AbstractLocator
Copyright © 2002-2019 Atlassian. All Rights Reserved.