首页 > 代码库 > Selenium的显示等待

Selenium的显示等待

?
1
2
3
4
5
6
7
8
9
Function<WebDriver, Boolean> waitFn = new Function<WebDriver, Boolean>() {
@Override
public Boolean apply(WebDriver driver) {
    Point newPos = page.getWDGAttrDetail().getLocation();
    return newPos.getY() != prePos.getY();
    }
};
         
SeleniumUtil.createWait(page.getDriver()).until(waitFn);