Java 尝试处理日历弹出窗口时出错
我试图处理一个日历弹出窗口,但出现了一个错误。Java 尝试处理日历弹出窗口时出错,java,selenium,xpath,selenium-chromedriver,Java,Selenium,Xpath,Selenium Chromedriver,我试图处理一个日历弹出窗口,但出现了一个错误。 无法单击日期 我使用的代码是: driver.findElement(By.xpath("//*[@id='bidExpirationDate']")).click(); List<WebElement> alldates=driver.findElements(By.xpath("//td[@role='gridcell']")); System.out.println("All date: "+alldates.size()); f
无法单击日期 我使用的代码是:
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;
}
}
如何解决此错误?使用相关的HTML@DebanjanB请查看HTMl代码这里是HTMl代码:Sun Mon 1您需要用HTMl更新实际问题以进行适当分析,而不是发表评论
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