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() {

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

});
}

转载于:https://www.cnblogs.com/woniu123/p/6113696.html

你可能感兴趣的:(Element is not currently interactable and may not be manipulated)