selenium - 当我尝试使用 selenium 在日历小部件上单击日期时出现此错误
问题描述
当我尝试使用 selenium 在日历小部件上单击日期时出现此错误:
[JavaScript 错误:“b.elementFromPoint 不是函数”{file:“file:///tmp/anonymous3738058585112632092webdriver-profile/extensions/fxdriver@googlecode.com/components/synthetic-mouse.js”行:11130}]' [JavaScript 错误:“b.elementFromPoint 不是函数”{file:“file:///tmp/anonymous373805858
解决方案
公共无效点击日期(){
String minDate = "12";
webDriverWait(2);
List<WebElement> list = element(test).findElements(By.tagName("td"));
for(WebElement col : list){
System.out.println(col.getText());
if(col.getText().trim().equals(minDate)){
col.click();
}
}
}
这里的测试包含 By test = By.className("bs-datepicker-body");
推荐阅读
- outlook - 右键单击上下文未显示在 Outlook 加载项上
- python - 如何在函数中编辑变量,而不是将其传递给另一个函数?
- git - 二进制文件和“* text eol=lf”
- javascript - Nextjs 在 app.prepare().then() 中使用 Promise 时出错:getaddrinfo ENOTFOUND undefined
- python - 编写一个名为 get_first_capital(word) 的递归函数,它接受一个字符串作为参数
- refactoring - 如何分解 imacro 脚本?
- mysql - 两个表中两列之间的case语句
- apache-kafka - 在kafka connect中生成基于时间戳的documenIds
- python - 如何在 Numpy/Python 中轻松地对多维数组进行切片/索引?
- python - Python 2 到 3 升级后 Django 初始页面加载缓慢