Graphene Implementation 1.0.0.CR3

org.jboss.arquillian.ajocado.waiting.selenium
Class DefaultSeleniumWaiting

java.lang.Object
  extended by org.jboss.arquillian.ajocado.waiting.DefaultWaiting<SeleniumWaiting>
      extended by org.jboss.arquillian.ajocado.waiting.selenium.DefaultSeleniumWaiting
All Implemented Interfaces:
Cloneable, SeleniumWaiting, Waiting<SeleniumWaiting>

public class DefaultSeleniumWaiting
extends DefaultWaiting<SeleniumWaiting>
implements SeleniumWaiting

Implementation of waiting for satisfaction of conditions on page using polling the Selenium API with given question.

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
DefaultSeleniumWaiting()
           
 
Method Summary
 void until(SeleniumCondition condition)
          Stars loop waiting to satisfy condition.
<T> void
waitForChange(SeleniumRetriever<T> retriever)
           Waits until Retrieve's implementation doesn't retrieve value other than value stored by initialization in retriever.
<T> void
waitForChange(T oldValue, SeleniumRetriever<T> retriever)
          Waits until Retrieve's implementation doesn't retrieve value other than oldValue.
<T> T
waitForChangeAndReturn(SeleniumRetriever<T> retriever)
           Waits until Retrieve's implementation doesn't retrieve value other than value stored by initialization in retriever.
<T> T
waitForChangeAndReturn(T oldValue, SeleniumRetriever<T> retriever)
          Waits until Retrieve's implementation doesn't retrieve value other than oldValue and this new value returns.
 
Methods inherited from class org.jboss.arquillian.ajocado.waiting.DefaultWaiting
dontFail, fail, failWith, failWith, getInterval, getTimeout, interval, isDelayed, noDelay, timeout, waitForTimeout, withDelay
 
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.Waiting
dontFail, failWith, failWith, interval, noDelay, timeout, waitForTimeout, withDelay
 

Constructor Detail

DefaultSeleniumWaiting

public DefaultSeleniumWaiting()
Method Detail

until

public void until(SeleniumCondition condition)
Stars loop waiting to satisfy condition.

Specified by:
until in interface SeleniumWaiting
Parameters:
condition - what wait for to be satisfied

waitForChange

public <T> void waitForChange(T oldValue,
                              SeleniumRetriever<T> retriever)
Waits until Retrieve's implementation doesn't retrieve value other than oldValue.

Specified by:
waitForChange in interface SeleniumWaiting
Type Parameters:
T - type of value what we are waiting for change
Parameters:
oldValue - value that we are waiting for change
retriever - implementation of retrieving actual value

waitForChange

public <T> void waitForChange(SeleniumRetriever<T> retriever)

Waits until Retrieve's implementation doesn't retrieve value other than value stored by initialization in retriever.

After retrieving, new value will be associated with given Retriever.

Note that Retriever needs to be initialized first by one of methods RetrievedValueHolder.initializeValue() or RetrievedValueHolder.setValue(Object).

Specified by:
waitForChange in interface SeleniumWaiting
Type Parameters:
T - type of value what we are waiting for change
Parameters:
retriever - implementation of retrieving actual value

waitForChangeAndReturn

public <T> T waitForChangeAndReturn(T oldValue,
                                    SeleniumRetriever<T> retriever)
Waits until Retrieve's implementation doesn't retrieve value other than oldValue and this new value returns.

Specified by:
waitForChangeAndReturn in interface SeleniumWaiting
Type Parameters:
T - type of value what we are waiting for change
Parameters:
oldValue - value that we are waiting for change
retriever - implementation of retrieving actual value
Returns:
new retrieved value

waitForChangeAndReturn

public <T> T waitForChangeAndReturn(SeleniumRetriever<T> retriever)

Waits until Retrieve's implementation doesn't retrieve value other than value stored by initialization in retriever.

After retrieving, new value will be associated with given Retriever.

Note that Retriever needs to be initialized first by one of methods RetrievedValueHolder.initializeValue() or RetrievedValueHolder.setValue(Object).

Specified by:
waitForChangeAndReturn in interface SeleniumWaiting
Type Parameters:
T - type of value what we are waiting for change
Parameters:
retriever - implementation of retrieving actual value
Returns:
new retrieved value

Graphene Implementation 1.0.0.CR3

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