回放是出现以下错误:

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

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

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. 五个有用的jquery小技巧

    1.禁用鼠标右键 $(document).ready(function() { $(document).bind("contextmenu", function(e) { retu ...

  2. notepad++下的字体设置

    设置 - 语言格式设置 中

  3. UESTC 900 方老师炸弹 --Tarjan求割点及删点后连通分量数

    Tarjan算法. 1.若u为根,且度大于1,则为割点 2.若u不为根,如果low[v]>=dfn[u],则u为割点(出现重边时可能导致等号,要判重边) 3.若low[v]>dfn[u], ...

  4. UltraISO制作U盘启动盘安装Win7/10系统攻略

    UltraISO制作U盘启动盘安装Win7/9/10系统攻略 U盘安装好处就是不用使用笨拙的光盘,光盘还容易出现问题,无法读取的问题.U盘体积小,携带方便,随时都可以制作系统启动盘. U盘建议选择8G ...

  5. java 10-4 Scanner方法

    Scanner:用于接收键盘录入数据  常用的两个方法(int举例): public int nextInt():获取一个int类型的值 public String nextLine():获取一个St ...

  6. CSS3中的字体rem

    rem和em都是相对单位,em相对父元素的font-size来计算,而rem是根据文档根元素(html)的font-size大小来计算的 通常将html的字体大小设为62.5%(等于10px),当然也 ...

  7. rsync+inotify实时同步环境部署记录

    随着应用系统规模的不断扩大,对数据的安全性和可靠性也提出的更好的要求,rsync在高端业务系统中也逐渐暴露出了很多不足.首先,rsync在同步数据时,需要扫描所有文件后进行比对,进行差量传输.如果文件 ...

  8. 使用CSS3制作72个webapp图标

    前言 移动网络带宽的快慢直接影响webapp应用体验效果的优差,其中加载图片是很耗流量的,所以对这一方面的性能优化是很需要的.一般对于那些小而多的图片(图标)都会采用sprite合并成一张图片来减少h ...

  9. STL之stack栈

    栈(statck)这种数据结构在计算机中是相当出名的.栈中的数据是先进后出的(First In Last Out, FILO).栈只有一个出口,允许新增元素(只能在栈顶上增加).移出元素(只能移出栈顶 ...

  10. [1]Telerik Extensions for ASP.NET MVC 中文教程(转)

    http://demos.telerik.com/aspnet-mvc/ Telerik Extensions for ASP.NET MVC 是Telerik 公司专门针对Asp.net MVC 开 ...