我为 datepicker 编写了一个脚本来从日历中选择日期。脚本在本地运行良好,但是当我通过 jenkins 运行它时,脚本失败了。
action.moveToElement(driver.findElement(By.xpath("//*[@id='ui-datepicker-div']/div[1]/div/a/span")));//locating the element to click
action.perform();
action.click(driver.findElement(By.xpath("//*[@id='ui-datepicker-div']/div[1]/div/a/span"))); //this line is not executing
action.perform();
单击该元素的脚本不起作用。我正进入(状态error as "Element is not currently visible and so may not be interacted with"
我也试过驱动程序。findElement(By.xpath("//*[@id='ui-datepicker-div']/div[1]/div/a/span")).click() by replacing action.click()
但仍然没有用。