当我尝试发送密钥时,我得到一个错误
Exception in thread "main" org.openqa.selenium.InvalidElementStateException: {"errorMessage":"Element is not currently interactable and may not be manipulated"...
at main.Main_1.main(Main_1.java:39)
Caused by: org.openqa.selenium.remote.ScreenshotException: Screen shot has been taken...
Caused by: org.openqa.selenium.InvalidElementStateException: {"errorMessage":"Element is not currently interactable and may not be manipulated"...
一个代码:
driver.get("site url");
wait.until( ExpectedConditions.presenceOfElementLocated(By.name("query")) );
System.out.println(driver.getTitle()); //this line works
driver.findElement(By.name("query")).sendKeys("test"); //error here (Main_1.java:39)
是什么原因?