Graphene Selenium: API 2.0.0.Alpha1

org.jboss.arquillian.ajocado.locator
Class AbstractLocator<T extends Locator<T>>

java.lang.Object
  extended by org.jboss.arquillian.ajocado.locator.AbstractLocator<T>
Type Parameters:
T - the type of locator which can be derived from this locator
All Implemented Interfaces:
Locator<T>, SeleniumRepresentable
Direct Known Subclasses:
AbstractElementLocator, AbstractFrameLocator, AbstractOptionLocator, AbstractWindowLocator, 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 inSeleniumRepresentation()

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
AbstractLocator(String locator)
          The locator constructor
 
Method Summary
 Locator<T> format(Object... args)
          Formats the locator with placeholders given by SimplifiedFormat.
 String getRawLocator()
          Returns the raw locator (without the prefix defining location strategy) representation.
 String inSeleniumRepresentation()
          Returns Selenium's string representation of this object
 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.arquillian.ajocado.locator.Locator
getLocationStrategy
 

Constructor Detail

AbstractLocator

public AbstractLocator(String locator)
The locator constructor

Parameters:
locator - the string representation of locator (without the locator type prefix)
Method Detail

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)
Description copied from interface: Locator
Formats the locator with placeholders given by SimplifiedFormat.

Specified by:
format in interface Locator<T extends Locator<T>>
Parameters:
args - the arguments for filling in the placeholders
Returns:
the locator with filled placeholders with given arguments

inSeleniumRepresentation

public String inSeleniumRepresentation()
Description copied from interface: SeleniumRepresentable
Returns Selenium's string representation of this object

Specified by:
inSeleniumRepresentation in interface SeleniumRepresentable
Returns:
Selenium's string representation of this object

toString

public String toString()
Overrides:
toString in class Object

Graphene Selenium: API 2.0.0.Alpha1

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.