Graphene Implementation 1.0.0.CR3

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

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

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

Retrieves the text for given elementLocator

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
protected TextRetriever()
          Instantiates a new text retriever.
 
Method Summary
 Convertor<String,String> getConvertor()
          Uses PassOnConvertor to pass the JavaScript result to result value.
static TextRetriever getInstance()
          Factory method.
 JavaScript getJavaScriptRetrieve()
          JavaScript expression to retrieve text value from element given by elementLocator
 TextRetriever locator(ElementLocator<?> elementLocator)
          Gets a TextRetriever object preset with elementLocator to given value.
 String retrieve()
          Retrieves the text value from element given by elementLocator
 
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

TextRetriever

protected TextRetriever()
Instantiates a new text retriever.

Method Detail

retrieve

public String retrieve()
Retrieves the text value from element given by elementLocator

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 text value from element given by elementLocator

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

getInstance

public static TextRetriever getInstance()
Factory method.

Returns:
single instance of TextRetriever

locator

public TextRetriever locator(ElementLocator<?> elementLocator)
Gets a TextRetriever object preset with elementLocator to given value.

Parameters:
elementLocator - the element locator to preset
Returns:
the TextRetriever preset with elementLocator 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.