org.jboss.test.selenium.locator
Class AbstractElementLocator<T extends ElementLocator<T>>

java.lang.Object
  extended by org.jboss.test.selenium.locator.AbstractLocator<T>
      extended by org.jboss.test.selenium.locator.AbstractElementLocator<T>
Type Parameters:
T - the type of locator which can be derived from this locator
All Implemented Interfaces:
ElementLocator<T>, Locator<T>
Direct Known Subclasses:
CssLocator, DomLocator, IdentifierLocator, IdLocator, JQueryLocator, LinkLocator, NameLocator, XpathLocator

public abstract class AbstractElementLocator<T extends ElementLocator<T>>
extends AbstractLocator<T>
implements ElementLocator<T>

Abstract implementation of element locator able to derive attributes for itself.

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
AbstractElementLocator(String locator)
           
 
Method Summary
 ElementLocator<T> format(Object... args)
           
 AttributeLocator<T> getAttribute(Attribute attribute)
          Returns the default locator for attribute belongs to this locator.
 
Methods inherited from class org.jboss.test.selenium.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.test.selenium.locator.ElementLocator
getLocationStrategy
 
Methods inherited from interface org.jboss.test.selenium.locator.Locator
getAsString, getRawLocator
 

Constructor Detail

AbstractElementLocator

public AbstractElementLocator(String locator)
Method Detail

getAttribute

public AttributeLocator<T> getAttribute(Attribute attribute)
Returns the default locator for attribute belongs to this locator.

Specified by:
getAttribute in interface ElementLocator<T extends ElementLocator<T>>
Parameters:
attribute - type for obtaining from this locator
Returns:
the attribute for this locator

format

public ElementLocator<T> format(Object... args)
Specified by:
format in interface ElementLocator<T extends ElementLocator<T>>
Specified by:
format in interface Locator<T extends ElementLocator<T>>
Overrides:
format in class AbstractLocator<T extends ElementLocator<T>>


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