net.sf.sahi.client
Class BrowserCondition
java.lang.Object
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
Method Summary |
abstract boolean |
test()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BrowserCondition
public BrowserCondition(Browser browser)
test
public abstract boolean test()
throws ExecutionException
- Throws:
ExecutionException