com.atlassian.jira.functest.framework.locator
Class CssLocator
java.lang.Object
com.atlassian.jira.functest.framework.locator.AbstractLocator
com.atlassian.jira.functest.framework.locator.CssLocator
- All Implemented Interfaces:
- Locator
public class CssLocator
- extends AbstractLocator
- implements Locator
A CSS locator that uses JSOUP org.jsoup.nodes.Document) under the covers
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
- Since:
- v4.3
Constructor Summary |
CssLocator(Node startNode,
String cssSelector)
Locates Node 's starting from the specified Node
The start node can ONLY be a node given out previous by another CssLocator. |
CssLocator(net.sourceforge.jwebunit.WebTester tester,
String cssSelector)
Locates Node 's using the specified WebTester |
Methods inherited from class com.atlassian.jira.functest.framework.locator.AbstractLocator |
allMatches, containsNode, exists, getDOM, getHTML, getHTML, getNode, getNodesTextImpl, getNodeTextImpl, getRawText, getRawText, getText, getText, getWebResponse, hasNodes, iterator, toStringImpl |
Methods inherited from interface com.atlassian.jira.functest.framework.locator.Locator |
allMatches, exists, getHTML, getHTML, getNode, getRawText, getRawText, getText, getText, hasNodes, iterator |
CssLocator
public CssLocator(net.sourceforge.jwebunit.WebTester tester,
String cssSelector)
- Locates
Node
's using the specified WebTester
- Parameters:
tester
- the WebTester in playcssSelector
- the CSS selector string
CssLocator
public CssLocator(Node startNode,
String cssSelector)
- Locates
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.
- Parameters:
startNode
- the Node
to start at.cssSelector
- the CSS selector string
getNodes
public Node[] getNodes()
- Description copied from interface:
Locator
- A
Locator
may return 0 nodes, 1 node or multiple nodes.
- Specified by:
getNodes
in interface Locator
- Returns:
- a non null array of Nodes that match, or a zero sized array of no matches are made
toString
public String toString()
- Description copied from interface:
Locator
- A meaningful "debugging" representation of this Locator to help when test fail.
- Specified by:
toString
in interface Locator
- Overrides:
toString
in class Object
- Returns:
- A meaningful "debugging" representation of this Locator to help when test fail.
betterNode
protected Node betterNode(Node node)
- Overrides:
betterNode
in class AbstractLocator
Copyright © 2002-2014 Atlassian. All Rights Reserved.