Selenium Webdriver : Element not found in the cache - perhaps the page has changed since it
2015-11-06 10:45
609 查看
Selenium
Webdriver with Java: Element not found in the cache - perhaps the page has changed since it was looked up
可以写这样的方法,先找到这个元素,再点击
然后调用
可参考
http://stackoverflow.com/questions/17972359/selenium-webdriver-with-java-element-not-found-in-the-cache-perhaps-the-page
Webdriver with Java: Element not found in the cache - perhaps the page has changed since it was looked up
可以写这样的方法,先找到这个元素,再点击
public void clickAnElementByLinkText(String linkText) { wait.until(ExpectedConditions.presenceOfElementLocated(By.linkText(linkText))); driver.findElement(By.linkText(linkText)).click(); }
然后调用
clickAnElementByLinkText("文字");
可参考
http://stackoverflow.com/questions/17972359/selenium-webdriver-with-java-element-not-found-in-the-cache-perhaps-the-page
相关文章推荐
- MySQL5.6新特性Index conditontion pushdow
- MongoVUE破解方法
- MySQL数据库使用命令行备份|MySQL数据库备份命令
- h.264 NAL单元分析
- HiddenField控件的使用
- KVO 设计模式之观察者模式
- git library
- obs多开方法
- NSRange类详解
- Java通过axis调用WebService
- SQL查询数据库表大小及行数
- VB技巧—:简单的将保存的数值加密
- 埃科:悠闲的愤怒
- OC基础知识--字典处理方法
- Spark读取Hbase的数据
- android onInterceptTouchEvent和onTouchEvent的执行关系
- ORACLE中每个分组后加个合计,最后总合计的GROUP BY rollup,和中文排序
- 区分分辨率、像素、点、尺寸
- 关于Mybits3和Spring4的整合
- addOnloadEvent(func)函数