Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/400.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 尝试处理日历弹出窗口时出错_Java_Selenium_Xpath_Selenium Chromedriver - Fatal编程技术网

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