??????Selenium WebDriver??????????????????????????????????Python????????????Java????????????????Eclipse+Selenium 2.32???????????
????Sample????????????£??????????

 

(new WebDriverWait(driver?? 10)).until(new ExpectedCondition<Boolean>() {
public Boolean apply(WebDriver d) {
return d.getTitle().toLowerCase().startsWith("cheese!");
}
});

???????????д????

 

WebDriverWait WDW = new WebDriverWait(driver?? 10);
WDW.until(new theWait());
//(new WebDriverWait(driver?? 10)).until(new ExpectedCondition<Boolean>() {
//    public Boolean apply(WebDriver d) {
//        return d.getTitle().toLowerCase().startsWith("cheese!");
//    }
//});
// Should see: "cheese! - Google Search"
public static class theWait implements ExpectedCondition<Boolean>{
public Boolean apply(WebDriver d) {
Boolean bool =  d.getTitle().toLowerCase().startsWith("cheese!");
if(bool == true)
{
String title = d.getTitle();
System.out.println("Page title is: " + title);
}
return bool;
}
}

???????????????????????Java????override??С????