Graphene Implementation 1.0.0.CR3

org.jboss.arquillian.ajocado.waiting.retrievers
Class AttributeRetriever

java.lang.Object
  extended by org.jboss.arquillian.ajocado.waiting.retrievers.AbstractRetriever<String>
      extended by org.jboss.arquillian.ajocado.waiting.retrievers.AttributeRetriever
All Implemented Interfaces:
JavaScriptRetriever<String>, RetrievedValueHolder<String>, Retriever<String>, SeleniumRetriever<String>

public class AttributeRetriever
extends AbstractRetriever<String>
implements Retriever<String>

Retrieves the attribute with given attributeLocator.

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
protected AttributeRetriever()
          Instantiates a new attribute retriever.
 
Method Summary
 AttributeRetriever attributeLocator(AttributeLocator<?> attributeLocator)
          Gets a AttributeRetriever object preset with attributeLocator to given value.
 Convertor<String,String> getConvertor()
          Uses PassOnConvertor to pass the JavaScript result to result value.
static AttributeRetriever getInstance()
          Factory method.
 JavaScript getJavaScriptRetrieve()
          JavaScript expression to retrieve attribute value from element given by attributeLocator
 String retrieve()
          Retrieves the attribute value from element given by attributeLocator
 
Methods inherited from class org.jboss.arquillian.ajocado.waiting.retrievers.AbstractRetriever
getValue, initializeValue, isValueChanged, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.arquillian.ajocado.waiting.retrievers.RetrievedValueHolder
getValue, initializeValue, setValue
 

Constructor Detail

AttributeRetriever

protected AttributeRetriever()
Instantiates a new attribute retriever.

Method Detail

retrieve

public String retrieve()
Retrieves the attribute value from element given by attributeLocator

Specified by:
retrieve in interface SeleniumRetriever<String>
Specified by:
retrieve in class AbstractRetriever<String>
Returns:
retrieved value

getJavaScriptRetrieve

public JavaScript getJavaScriptRetrieve()
JavaScript expression to retrieve attribute value from element given by attributeLocator

Specified by:
getJavaScriptRetrieve in interface JavaScriptRetriever<String>
Returns:
the JavaScript

getInstance

public static AttributeRetriever getInstance()
Factory method.

Returns:
single instance of AttributeRetriever

attributeLocator

public AttributeRetriever attributeLocator(AttributeLocator<?> attributeLocator)
Gets a AttributeRetriever object preset with attributeLocator to given value.

Parameters:
attributeLocator - the attribute locator to preset
Returns:
the AttributeRetriever preset with attributeLocator of given value

getConvertor

public Convertor<String,String> getConvertor()
Uses PassOnConvertor to pass the JavaScript result to result value.

Specified by:
getConvertor in interface JavaScriptRetriever<String>
Returns:
the convertor for converting JavaScript representation to Object representation and vice versa.

Graphene Implementation 1.0.0.CR3

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