ElementNotInteractableException,Element could not be scrolled into view

在使用webdriver处理表格的时候,点击tr标签。可能会遇到ElementNotInteractableException,Element could not be scrolled into view错误

参考解决方法:

1、 元素点击前,加等待

try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

2. 使用action的方式点击元素

@Override
public void clickElementByAction(WebElement element) {
        Actions actions = new Actions(driver);
        actions.moveToElement(element).click().perform();
}
原文地址:https://www.cnblogs.com/lozz/p/13713462.html