Element is not currently interactable and may not be manipulated

Element is not currently interactable and may not be manipulated:元素当前不可交互,并且可能无法操作.

解决方法:

调用该方法,智能等待元素加载出来

public void waitForElementToLoad(int timeOut, By by) {
new WebDriverWait(currentDriver, timeOut).until(new ExpectedCondition<Boolean>() {

@Override
public Boolean apply(WebDriver driver) {
WebElement element = driver.findElement(by);
return element.isDisplayed();
}

});
}

posted @ 2016-11-29 15:05  留白*  阅读(1277)  评论(0编辑  收藏  举报