Ajocado Implementation 1.0.0.Alpha2

org.jboss.arquillian.ajocado.locator
Class JQueryLocator

java.lang.Object
  extended by org.jboss.arquillian.ajocado.locator.AbstractLocator<T>
      extended by org.jboss.arquillian.ajocado.locator.AbstractElementLocator<JQueryLocator>
          extended by org.jboss.arquillian.ajocado.locator.JQueryLocator
All Implemented Interfaces:
CompoundableLocator<JQueryLocator>, ElementLocator<JQueryLocator>, ExtendedLocator<JQueryLocator>, IterableLocator<JQueryLocator>, Locator<JQueryLocator>

public class JQueryLocator
extends AbstractElementLocator<JQueryLocator>
implements ExtendedLocator<JQueryLocator>

Locates the element using JQuery Selector syntax.

This syntax is extended in AjaxSelenium by new filters similar to :contains(text)

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
JQueryLocator(String jquerySelector)
          Instantiates a new jQuery locator.
 
Method Summary
 JQueryLocator format(Object... args)
           
 Iterable<JQueryLocator> getAllChildren()
           
 Iterable<JQueryLocator> getAllOccurrences()
           
 JQueryLocator getChild(JQueryLocator elementLocator)
          Gets a child of this locator by composing this locator with given elementLocator.
 Iterable<JQueryLocator> getChildren(JQueryLocator elementLocator)
           
 JQueryLocator getDescendant(JQueryLocator elementLocator)
          Gets a descendant of this locator by composing this locator with given elementLocator.
 Iterable<JQueryLocator> getDescendants(JQueryLocator elementLocator)
           
 ElementLocationStrategy getLocationStrategy()
           
 JQueryLocator getNthChildElement(int index)
           
 JQueryLocator getNthOccurence(int index)
           
 
Methods inherited from class org.jboss.arquillian.ajocado.locator.AbstractElementLocator
getAttribute
 
Methods inherited from class org.jboss.arquillian.ajocado.locator.AbstractLocator
getAsString, getRawLocator, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.arquillian.ajocado.locator.ElementLocator
getAttribute
 
Methods inherited from interface org.jboss.arquillian.ajocado.locator.Locator
getAsString, getRawLocator
 

Constructor Detail

JQueryLocator

public JQueryLocator(String jquerySelector)
Instantiates a new jQuery locator.

Parameters:
jquerySelector - the jquery selector
Method Detail

getLocationStrategy

public ElementLocationStrategy getLocationStrategy()
Specified by:
getLocationStrategy in interface ElementLocator<JQueryLocator>
Specified by:
getLocationStrategy in interface Locator<JQueryLocator>

getNthChildElement

public JQueryLocator getNthChildElement(int index)
Specified by:
getNthChildElement in interface IterableLocator<JQueryLocator>

getNthOccurence

public JQueryLocator getNthOccurence(int index)
Specified by:
getNthOccurence in interface IterableLocator<JQueryLocator>

getAllChildren

public Iterable<JQueryLocator> getAllChildren()
Specified by:
getAllChildren in interface IterableLocator<JQueryLocator>

getAllOccurrences

public Iterable<JQueryLocator> getAllOccurrences()
Specified by:
getAllOccurrences in interface IterableLocator<JQueryLocator>

getChildren

public Iterable<JQueryLocator> getChildren(JQueryLocator elementLocator)
Specified by:
getChildren in interface IterableLocator<JQueryLocator>

getDescendants

public Iterable<JQueryLocator> getDescendants(JQueryLocator elementLocator)
Specified by:
getDescendants in interface IterableLocator<JQueryLocator>

getChild

public JQueryLocator getChild(JQueryLocator 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<JQueryLocator>
Parameters:
elementLocator - are added to this locator to compose new compount locator
Returns:
the composed locator for this locator with added elementLocator

getDescendant

public JQueryLocator getDescendant(JQueryLocator 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<JQueryLocator>
Parameters:
elementLocator - are added to this locator to compose new compound locator
Returns:
the composed locator for this locator with added elementLocator

format

public JQueryLocator format(Object... args)
Specified by:
format in interface ElementLocator<JQueryLocator>
Specified by:
format in interface ExtendedLocator<JQueryLocator>
Specified by:
format in interface Locator<JQueryLocator>
Overrides:
format in class AbstractElementLocator<JQueryLocator>

Ajocado Implementation 1.0.0.Alpha2

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.