回放是出现以下错误:

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

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

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. codeforces 721C C. Journey(dp)

    题目链接: C. Journey time limit per test 3 seconds memory limit per test 256 megabytes input standard in ...

  2. Windows安装 ANT

    apache-ant-1.7.1-bin.zip 下载地址:http://ant.apache.org/bindownload.cgi 第一步      解压apache-ant-1.7.1-bin. ...

  3. 用bower命令创建项目

    1,先安装bower,npm install -g bower 2,cd到项目文件夹下,安装项目所需要的依赖包,比如 npm install jquery;npm install bootstrap, ...

  4. 25个实用的jquery技巧

    1. 去除页面的右键菜单   $(document).ready(function(){ $(document).bind(“contextmenu”,function(e){returnfalse; ...

  5. Python-面向对像及其他

    其他相关 1.isinstance(obj,cls)       检查是否obj是类cls的对象   # 针对变量 n = 123 s = "123" print isinstan ...

  6. 应用python编写简单新浪微博应用(一)

    转载至:http://blog.sina.com.cn/s/blog_6c39196501016o7n.html 首先,你要有一个新浪微博账号. 申请页面:http://weibo.com 其次,你要 ...

  7. C# 应用程序配置文件操作

    应用程序配置文件,对于asp.net是 web.config对于WINFORM程序是 App.Config(ExeName.exe.config). 配置文件,对于程序本身来说,就是基础和依据,其本质 ...

  8. ztree插件(JQuery Tree)

    本次使用的ztree插件,基本上所有的需求都能满足,可谓功能强大. * [http://www.ztree.me/v3/api.php zTree v3.0 API 文档] * [http://www ...

  9. C语言 文件操作8--fputs()和fgets()

    //fputs()和fgets() #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> # ...

  10. MSMQ消息队列安装

    一.Windows 7安装.管理消息队列1.安装消息队列   执行用户必须要有本地 Administrators 组中的成员身份,或等效身份.   具体步骤:    开始—>控制面板—>程 ...