selenium ide 录制回放link链接报错
回放是出现以下错误:
也就是回放点击打开新的链接时出现这个错误,
这个问题说的是 点击此链接会新打开一个窗口
selenium1是不支持多窗口切换的 因此会卡在这里,也就录制不支持这个操作,但是很多书都没有写出这个缺陷,都说又这个功能,真是很坑啊,我当时找到这个
原因时一万只羊驼飘过啊
selenium2 即 selenium1+webdriver 很好的解决了这个问题
selenium1 所以装再高版本也没用
selenium2 指的是 webdriver
webdriver是没有录制功能的 全凭手写
在stackoverflow我找到了最佳大答案
即通过放慢回放速度就可以正常打开连接了
I am executing a simple recorded script in Selenium , in which i just search a page in Google and then click it , but when Run that recorded script it is giving me the "Error [error] Element link not found". And following is the Script which i am running,any help would be very useful. New Test New Test open / type q Bill Gates click link=Bill Gates: Chairman click link=Bill Gates: Chairman |
|||
I got the same error message while going through the tutorials online. I found out that the scripts were running too fast for FF to load the links. If you slow down the playback by moving the green button on the Fast-Slow bar to somewhere in the middle the scripts run without any errors. |
||||
I guess I know the answer. It might be bcz of any javascript error(you can see that on the status bar at the Right corner(IE)) or that link element might not be placed correctly in the box(box model). Here you can use Selenium.focus("link=text") :selenium.keyPressNative("10") . It presses the enter key.but while selenium is executing this statement Do not change the focus from your AUT (don't touch the mouse). In IDE ,just paste the above statement on click(). |
|||||
|
Im assuming you are using Google instant as there is no "click search button" command, the link is probably not preset because selenium is not waiting for Google instant to respond or the javascript to render the link. If you manually add in a click command to search it should solve it. |
|||
My solution is almost the same as Cuongs. Though I change the speed by using a command and change it back afterwards. Before you click the link, you can set the speed to slow: Command: setSpeed Target: 3000 You can change the speed afterwards again to ~1000 |
|||
最新文章
- Socket
- wifi共享小工具
- SqlServer——阻止保存要求重新创建表的更改
- BZOJ 4408 神秘数
- Java8新特性 1——利用流和Lambda表达式操作集合
- vector中resize和reserve的区别,代码验证
- Knockout应用开发指南 第八章:简单应用举例(2)
- [Angular Tutorial] 9 -Routing &; Multiple Views
- Oracle 12cR1 RAC 在VMware Workstation上安装(上)—OS环境配置
- SSM框架整合项目 :投票系统
- SSH网上商城---邮件发送
- FreeSql.DbContext 第二个版本介绍
- python3 实例方法、类方法和静态方法
- SpringCloud笔记七:Zuul
- tiny6410的启动参数
- 【洛谷4238】 多项式求逆(NTT,分治)
- Elasticsearch学习之深入聚合分析三---案例实战
- 七、django rest_framework源码之视图
- Spring Boot学习笔记(二)全局捕获异常处理
- ubuntu scrapy 开发环境搭建
热门文章
- js练习-控制div属性
- 2014 Super Training #6 G Trim the Nails --状态压缩+BFS
- Java开发和运行环境的搭建
- 第一次使用Android Studio时你应该知道的一切配置(二):新建一个属于自己的工程并安装Genymotion模拟器
- JavaWeb学习----JSTL标签库
- (copy)MVC4.0网站发布和部署到IIS7.0上的方法
- mysqli_stmt预处理类
- UICollectionView使用
- android实现点击背景图片不同区域实现不同事件
- android Camera 中如何修改缩放变焦参数