net.sf.sahi.client
Class BrowserCondition

java.lang.Object
  extended by net.sf.sahi.client.BrowserCondition

public abstract class BrowserCondition
extends java.lang.Object

BrowserCondition is used to specify conditional waits. It is used in conjunction with browser.waitFor

   BrowserCondition condition = new BrowserCondition(browser){
                public boolean test() throws ExecutionException {
                        return "populated".equals(browser.textbox("t1").value());
                }};
        browser.waitFor(condition, 5000);
 

The above code will make the browser wait till the textbox's value becomes "populated".
If it does not become "populated", the browser will wait for max 5000 ms before moving to the next step


Constructor Summary
BrowserCondition(Browser browser)
           
 
Method Summary
abstract  boolean test()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrowserCondition

public BrowserCondition(Browser browser)
Method Detail

test

public abstract boolean test()
                      throws ExecutionException
Throws:
ExecutionException