org.jboss.test.selenium.locator
Class AbstractLocator<T extends Locator<T>>

java.lang.Object
  extended by org.jboss.test.selenium.locator.AbstractLocator<T>
Type Parameters:
T - the type of locator which can be derived from this locator
All Implemented Interfaces:
Locator<T>
Direct Known Subclasses:
AbstractElementLocator, AbstractOptionLocator, DefaultAttributeLocator

public abstract class AbstractLocator<T extends Locator<T>>
extends Object
implements Locator<T>

Abstract implementation of locator.

Able to return the locator as string for use in Selenium getAsString()

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
AbstractLocator(String locator)
           
 
Method Summary
 Locator<T> format(Object... args)
           
 String getAsString()
          Returns the locator represented as string used in Selenium to locate elements.
 String getRawLocator()
          Returns the raw locator (without the prefix defining location strategy) representation.
 String 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.Locator
getLocationStrategy
 

Constructor Detail

AbstractLocator

public AbstractLocator(String locator)
Method Detail

getAsString

public String getAsString()
Description copied from interface: Locator
Returns the locator represented as string used in Selenium to locate elements.

Specified by:
getAsString in interface Locator<T extends Locator<T>>
Returns:
the locator represented as string used in Selenium to locate elements.

getRawLocator

public String getRawLocator()
Description copied from interface: Locator
Returns the raw locator (without the prefix defining location strategy) representation.

Specified by:
getRawLocator in interface Locator<T extends Locator<T>>
Returns:
the raw locator (without the prefix defining location strategy) representation.

format

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

toString

public String toString()
Overrides:
toString in class Object


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