回放是出现以下错误:

也就是回放点击打开新的链接时出现这个错误,

这个问题说的是 点击此链接会新打开一个窗口

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

asked Jun 14 '11 at 19:52
mohsin

111
 

5 Answers

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.

answered Nov 2 '11 at 17:27
 

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().

answered Jun 15 '11 at 5:27
 
    
I thanks , i get the solution it was due to the fact that it looks for the Google search results prior to i press the <search> button , i think there needs to add a statement to press the <search> button/ – mohsin Jun 16 '11 at 10:47

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.

answered Jun 15 '11 at 19:41
Tnem

3,9181127
 

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

answered Jan 10 '13 at 15:01
Anton

314
 

Well, I don't think you have to slow the speed down. You know the problem is caused by clicking on the link before it is available, so you could add an extra command waitForVisible (e.g. link=Bill Gates: Chairman) before the clickAndWait command.

selenium ide 录制回放link链接报错的更多相关文章

  1. Selenium ide录制回放错误Timed out after 30000ms

    [error] Timed out after 30000ms     该问题可能是速度控制条播放速度过快导致,调整播放速度至slow 

  2. VS Code远程链接报错Could not establish connection to “hz.matpool.com”

    VS Code远程链接报错Could not establish connection to "hz-t2.matpool.com" 输出的部分内容 安装Git git for w ...

  3. 1.2 selenium IDE录制脚本

    1.打开Firefox浏览器中 selenium IDE

  4. Selenium IDE录制脚本时弹出窗口的完美处理

    很多朋友录制脚本时新打开弹出窗口后无法定位元素,我也遇到同样的问题,国内没有什么好的资料,于是就阅读英文,不断尝试,感觉那个selectWindow(title)什么就是个坑,我用这种方法成功处理后得 ...

  5. selenium IDE录制脚本和自定义脚本-->Katalon Recorder(二)

    selenium IDE提供了两种生成脚本的方式:录制脚本和自定义脚本 录制脚本:1.打开firefox空白标签,在标签上输入需要录制脚本的网址:2.打开selenium IDE界面中的录制按钮(圆形 ...

  6. selenium IDE录制

    一.        安装 可以用Firefox打开https://addons.mozilla.org/en-US/firefox/addon/selenium-ide/,在这里边找到和当前firef ...

  7. Selenium IDE录制脚本

    一.当Selenium IDE中Format没有转换格式时,操作:Options—Options...—勾选Enable experimental features

  8. SeleniumIDE从0到1 (Selenium IDE 录制)

    seleniumIDE安装成功后下面我们用百度网址来简单录制下: 简介一:百度输入框录制操作 1.打开SeleniumIDE 2.SeleniumIDE地址栏中输入百度网址:[https://www. ...

  9. selenium ide脚本回放出现element not found

    原因: 点击按钮,没有设置时间延迟,而页面加载,需要时间:当页面元素未加载完全,执行点击事件,就会报错:element... not found. 解决方案: 在点击事件前添加新的COMMAND.设置 ...

随机推荐

  1. [cocos2dx]让CCScrollView支持分页

    [cocos2dx]让CCScrollView支持分页 做过IOS开发的朋友, 肯定知道UIScrollView有一个isPaged属性. 当设置其为true的时候, 滑动会自动分页. 即, 每次滑动 ...

  2. ZOJ 3820 Building Fire Stations 求中点+树的直径+BFS

    题意:给一棵树,要求找出两个点,使得所有点到这两个点中距离与自己较近的一个点的距离的最大值(所有点的结果取最大的值,即最远距离)最小. 意思应该都能明白. 解法:考虑将这棵树摆直如下: 那么我们可以把 ...

  3. POJ 2263 Heavy Cargo 多种解法

    好题.这题可以有三种解法:1.Dijkstra   2.优先队列   3.并查集 我这里是优先队列的实现,以后有时间再用另两种方法做做..方法就是每次都选当前节点所连的权值最大的边,然后BFS搜索. ...

  4. Unity 2D Skeletal Animation

    本文记录在Unity中制作2D 骨骼动画的笔记 Unity版本:4.3 Uni2D 使用骨骼动画前,把Sprite Mesh 的Type 改为 Grid ,设置合适的骨骼数量和分配权重 1.选中创建好 ...

  5. Jenkins学习六:修改Jenkins用户的密码

    很多时候在使用jenkins的时候忘记密码了,遇到这种情况,可以看看下面的讲解. Jenkins专有用户的数据存放在JENKINS_HOME/users目录.users目录的结构你一看就懂.users ...

  6. Linux安装Redis

    环境:Centos 6.2 redis是当前比较热门的NOSQL系统之一,它是一个key-value存储系统.和Memcached类似,但很大程度补偿了memcached的不足,它支持存储的value ...

  7. java 21 - 14 Properties类

    类 Properties Properties 类表示了一个持久的属性集.Properties 可保存在流中或从流中加载.属性列表中每个键及其对应值都是一个字符串. 注意:Properties是Has ...

  8. 颗粒翻页(css3效果展示)

    用css3效果做了一个颗粒翻页效果,布局上,一张图片做底层,在这张图片上用js创建一层小的行和列各为r和c的小span,给这些span分别设置background-position:用来覆盖原来的一张 ...

  9. shell+curl监控网站页面(域名访问状态),并利用sedemail发送邮件

    应领导要求,对公司几个主要站点的域名访问情况进行监控.下面分享一个监控脚本,并利用sendemail进行邮件发送. 监控脚本如下:下面是写了一个多线程的网站状态检测脚本,直接从文件中读出站点地址,然后 ...

  10. 运维工作中sed常规操作命令梳理

    sed是一个流编辑器(stream editor),一个非交互式的行编辑器.它一次处理一行内容.处理时,把当前处理的行存储在临时缓冲区中,称为"模式空间",接着用sed命令处理缓冲 ...