Ajocado API 1.0.0.Alpha2

org.jboss.arquillian.ajocado.locator
Interface IterableLocator<T extends IterableLocator<T>>

Type Parameters:
T - type what we want to iterate over - this type will be returned by method provided by this interface
All Superinterfaces:
ElementLocator<T>, Locator<T>

public interface IterableLocator<T extends IterableLocator<T>>
extends ElementLocator<T>

Locator which can iterate over it's descendant.

Version:
$Revision$
Author:
Lukas Fryc

Method Summary
 Iterable<T> getAllChildren()
          Gets the all children of element given by this locator
 Iterable<T> getAllOccurrences()
          Gets the all occurrences of element given by this locator
 Iterable<T> getChildren(T elementLocator)
          Gets the children given by locator composed from this locator and given elementLocator.
 Iterable<T> getDescendants(T elementLocator)
          Gets all the descendants for this locator specified by composed locator from this locator and given elementLocator.
 T getNthChildElement(int index)
          Gets the N-th child element of this locator.
 T getNthOccurence(int index)
          Gets the N-th occurence of descendant for this locator's element
 
Methods inherited from interface org.jboss.arquillian.ajocado.locator.ElementLocator
format, getAttribute, getLocationStrategy
 
Methods inherited from interface org.jboss.arquillian.ajocado.locator.Locator
getAsString, getRawLocator
 

Method Detail

getNthChildElement

T getNthChildElement(int index)
Gets the N-th child element of this locator.

Parameters:
index - the index of the child subsequent to this locator
Returns:
the N-th child element of this locator

getNthOccurence

T getNthOccurence(int index)
Gets the N-th occurence of descendant for this locator's element

Parameters:
index - the index of the descendant of this locator
Returns:
the N-th occurence of descendant

getAllChildren

Iterable<T> getAllChildren()
Gets the all children of element given by this locator

Returns:
the all children of element given by this locator

getAllOccurrences

Iterable<T> getAllOccurrences()
Gets the all occurrences of element given by this locator

Returns:
the all occurrences of element given by this locator

getChildren

Iterable<T> getChildren(T elementLocator)
Gets the children given by locator composed from this locator and given elementLocator.

Parameters:
elementLocator - the locator for element for composition with this locator
Returns:
the children given by locator composed from this locator and elementLocator

getDescendants

Iterable<T> getDescendants(T elementLocator)
Gets all the descendants for this locator specified by composed locator from this locator and given elementLocator.

Parameters:
elementLocator - the element locator, which should be added to this locator to specify this element's descendants
Returns:
the descendants of element given by composition of this locator and elementLocator

Ajocado API 1.0.0.Alpha2

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