Hi all,
Thanks for you quick responses and help!
I've done it. :)
Create a class and write a method for it like,
public WebElement wait4IdPresent(WebDriver driver,final String
elementId, int timeOutInSeconds){
WebElement we=null;
try{
WebDriverWait wdw=new WebDriverWait(driver, timeOutInSeconds);
if((we=wdw.until(new ExpectedCondition<WebElement>(){
/* (non-Javadoc)
* @see com.google.common.base.Function#apply(java.lang.Object)
*/
@Override
public WebElement apply(WebDriver d) {
// TODO Auto-generated method stub
return d.findElement(By.id(elementId));
}
}))!=null){
report.report("Element "+elementId+" found!");
}
}catch(Exception e){
report.report("Element "+elementId+" was not found. Time out.",
false);
}
return we;
}
Thanks all again!
On Oct 21, 1:26 pm, Krishnan Mahadevan
> >
http://seleniumhq.org/docs/04_webdriver_advanced.htmlthatcan show you the