回放是出现以下错误:

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

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

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. SpringMVC系列之基本配置

    一.概述 Spring Web MVC是一种基于Java的实现了Web MVC设计模式的请求驱动类型的轻量级Web框架,即使用了MVC架构模式的思想,将web层进行职责解耦,基于请求驱动指的就是使用请 ...

  2. JavaScript---闭包和作用域链

    作用域和作用域链: 参考文章 :http://www.cnblogs.com/malinlin/p/6028842.html  http://www.cnblogs.com/lhb25/archive ...

  3. 解决: osx内置vpn连接后无法ping自己的vpn ip地址

    The route table looks like this after connected to the VPN: 10.20.1/24 10.20.11.147 UGSc 0 0 utun0 1 ...

  4. 解决centos7重启后出现ata bus error

    昨天把centos7装在电脑上了,还把win7系统格掉了,从此电脑上只装centos,有一种弃暗投明的感觉. 装完重启后欣赏了一番成果,一个halt命令想把系统关掉,却发现屏幕没黑,机器不转了,电源灯 ...

  5. no.1

    #import requests import urllib import bs4 try: html=urllib.urlopen('http://anyun.org') except HTTPer ...

  6. Opencv相关细节

    cvGetPerpective 和 cvFindHomography 前者是计算透视映射矩阵,后者是计算单应性矩阵. 当是逆透视的时候,前者可以认为是平面的单应性矩阵.     如上面的图所示: 矩形 ...

  7. JS调试加断点

    js在回调函数执行时直接就跳过了,想看下回调函数也看不了,调试的debug代码一时半会儿想不起来,找了几分钟找到了,还是记一下好. 1 debugger;

  8. Linux常用指令---系统管理

    四.linux服务器" [have no space]"开发机dev2上不管是upa/upc上传文件时,会挂载在/目录下,而此时这里只有3G空间,通过df -h显示各大挂载点使用情 ...

  9. 20145208 实验三 Java面向对象程序设计

    20145208 实验三 Java面向对象程序设计 实验内容 初步掌握单元测试和TDD 理解并掌握面向对象三要素:封装.继承.多态 初步掌握UML建模 熟悉S.O.L.I.D原则 了解设计模式 实验步 ...

  10. 测试技能积木-AWK的简要用法

    做测试工作,经常要分析日志,有的时候活儿还很脏很累,比如抽取符合某些pattern的行,重新格式化等等.有的时候,我们需要也创造一些测试用数据文件.基于上述两种原因,在Unix Like 系统上,一些 ...