org.jboss.arquillian.ajocado.locator
Class XPathLocator
java.lang.Object
org.jboss.arquillian.ajocado.locator.AbstractLocator<T>
org.jboss.arquillian.ajocado.locator.AbstractElementLocator<XPathLocator>
org.jboss.arquillian.ajocado.locator.XPathLocator
- All Implemented Interfaces:
- CompoundableLocator<XPathLocator>, ElementLocator<XPathLocator>, ExtendedLocator<XPathLocator>, IterableLocator<XPathLocator>, Locator<XPathLocator>
public class XPathLocator
- extends AbstractElementLocator<XPathLocator>
- implements ExtendedLocator<XPathLocator>
Locates the element using XPath expression.
- Version:
- $Revision$
- Author:
- Lukas Fryc
XPathLocator
public XPathLocator(String xpath)
- Instantiates a new xpath locator.
- Parameters:
xpath - the xpath
getLocationStrategy
public ElementLocationStrategy getLocationStrategy()
- Specified by:
getLocationStrategy in interface ElementLocator<XPathLocator>- Specified by:
getLocationStrategy in interface Locator<XPathLocator>
getNthChildElement
public XPathLocator getNthChildElement(int index)
- Specified by:
getNthChildElement in interface IterableLocator<XPathLocator>
getNthOccurence
public XPathLocator getNthOccurence(int index)
- Specified by:
getNthOccurence in interface IterableLocator<XPathLocator>
getAllChildren
public Iterable<XPathLocator> getAllChildren()
- Specified by:
getAllChildren in interface IterableLocator<XPathLocator>
getAllOccurrences
public Iterable<XPathLocator> getAllOccurrences()
- Specified by:
getAllOccurrences in interface IterableLocator<XPathLocator>
getChildren
public Iterable<XPathLocator> getChildren(XPathLocator elementLocator)
- Specified by:
getChildren in interface IterableLocator<XPathLocator>
getDescendants
public Iterable<XPathLocator> getDescendants(XPathLocator elementLocator)
- Specified by:
getDescendants in interface IterableLocator<XPathLocator>
getChild
public XPathLocator getChild(XPathLocator elementLocator)
- Description copied from interface:
CompoundableLocator
- Gets a child of this locator by composing this locator with given elementLocator.
- Specified by:
getChild in interface CompoundableLocator<XPathLocator>
- Parameters:
elementLocator - are added to this locator to compose new compount locator
- Returns:
- the composed locator for this locator with added elementLocator
getDescendant
public XPathLocator getDescendant(XPathLocator elementLocator)
- Description copied from interface:
CompoundableLocator
- Gets a descendant of this locator by composing this locator with given elementLocator.
- Specified by:
getDescendant in interface CompoundableLocator<XPathLocator>
- Parameters:
elementLocator - are added to this locator to compose new compound locator
- Returns:
- the composed locator for this locator with added elementLocator
format
public ExtendedLocator<XPathLocator> format(Object... args)
- Specified by:
format in interface ElementLocator<XPathLocator>- Specified by:
format in interface ExtendedLocator<XPathLocator>- Specified by:
format in interface Locator<XPathLocator>- Overrides:
format in class AbstractElementLocator<XPathLocator>
Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.