我试图处理日历弹出窗口,然后收到错误 它无法点击日期。
我使用的代码是:
driver.findElement(By.xpath("//*[@id='bidExpirationDate']")).click();
List<WebElement> alldates=driver.findElements(By.xpath("//td[@role='gridcell']"));
System.out.println("All date: "+alldates.size());
for(WebElement d:alldates)
{
String date=d.getText();
if(date.equalsIgnoreCase("21"))
{
d.click();
break;
}
}
输出:所有日期:42
Exception in thread "main" org.openqa.selenium.WebDriverException: [JavaScript Error: "b.elementFromPoint is not a function" {file: "file:///C:/Users/Office/AppData/Local/Temp/anonymous2113754378902429082webdriver-profile/extensions/fxdriver@googlecode.com/components/synthetic-mouse.js" line: 11130}]'
[JavaScript Error: "b.elementFromPoint is not a function" {file: "file:///C:/Users/Office/AppData/Local/Temp/anonymous2113754378902429082webdriver-profile/extensions/fxdriver@googlecode.com/components/synthetic-mouse.js" line: 11130}]' when calling method: [wdIMouse::click]
Command duration or timeout: 58 milliseconds
我如何解决此错误?