sendkeys方法是堆栈跟踪的问题.
at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:121)
请尝试Actions
类首先关注元素然后发送所需的键.
Actions actions = new Actions(driver); actions.moveToElement(element); actions.click(); actions.sendKeys("SOME DATA"); actions.build().perform();