Graphene Selenium: API 2.0.0.Alpha1

org.jboss.arquillian.ajocado.locator.element
Class AbstractElementLocator<T extends ElementLocator<T>>

java.lang.Object
  extended by org.jboss.arquillian.ajocado.locator.AbstractLocator<T>
      extended by org.jboss.arquillian.ajocado.locator.element.AbstractElementLocator<T>
Type Parameters:
T - the type of locator which can be derived from this locator
All Implemented Interfaces:
ElementLocator<T>, Locator<T>, SeleniumRepresentable
Direct Known Subclasses:
AbstractIterableLocator

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)
          Constructs locator for given string representation
 
Method Summary
 ElementLocator<T> format(Object... args)
          Formats the locator with placeholders given by SimplifiedFormat.
 AttributeLocator<T> getAttribute(Attribute attribute)
          Returns the default locator for attribute belongs to this locator.
 
Methods inherited from class org.jboss.arquillian.ajocado.locator.AbstractLocator
getRawLocator, inSeleniumRepresentation, 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.element.ElementLocator
getLocationStrategy
 
Methods inherited from interface org.jboss.arquillian.ajocado.locator.Locator
getRawLocator
 
Methods inherited from interface org.jboss.arquillian.ajocado.selenium.SeleniumRepresentable
inSeleniumRepresentation
 

Constructor Detail

AbstractElementLocator

public AbstractElementLocator(String locator)
Constructs locator for given string representation

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

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>>
Parameters:
args - the arguments for filling in the placeholders
Returns:
the locator with filled placeholders with given arguments

Graphene Selenium: API 2.0.0.Alpha1

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