博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
selenium ide 录制回放link链接报错
阅读量:6474 次
发布时间:2019-06-23

本文共 2707 字,大约阅读时间需要 9 分钟。

回放是出现以下错误:

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

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

selenium1是不支持多窗口切换的 因此会卡在这里,也就录制不支持这个操作,但是很多书都没有写出这个缺陷,都说又这个功能,真是很坑啊,我当时找到这个

原因时一万只羊驼飘过啊

selenium2 即 selenium1+webdriver 很好的解决了这个问题

selenium1 所以装再高版本也没用

selenium2 指的是 webdriver

webdriver是没有录制功能的 全凭手写

 

 

在stackoverflow我找到了最佳大答案

即通过放慢回放速度就可以正常打开连接了

 

0
 

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

 

 

5 Answers

7

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.

 
0

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

 
    
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/ –  
0

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.

 
0

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

 
0

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.

 

转载于:https://www.cnblogs.com/my-blogs-for-everone/p/5657505.html

你可能感兴趣的文章
hibernate总结-缓存
查看>>
(一三九)静态联编和动态联编
查看>>
Android 使用ViewPager实现类似gallery画廊的效果(画廊效果之ViewPager显示多个图片)...
查看>>
js和es6中常用的字符串方法总结(收藏)
查看>>
猪行天下之Python基础——3.2 列表 & 元组
查看>>
Http和Https
查看>>
Django使用Channels实现WebSocket--上篇
查看>>
Java 设计模式(三)《单例模式》
查看>>
个人博客
查看>>
IDEA 快捷键(Windows)
查看>>
关于双重锁单例模式
查看>>
小白的进阶之路之vue源码解读(0)
查看>>
《Miss Talk》第05期:对话唱唱启蒙英语技术总监 李超
查看>>
【Android架构】基于MVP模式的Retrofit2+RXjava封装之多Url(七)
查看>>
MockJS快速入门
查看>>
中午和CTO一起吃饭有感致程序员(续)
查看>>
Shell文件重定向的3种方法
查看>>
Zabbix 给主机添加模板
查看>>
深度使用react-native的热更新能力,必须知道的一个shell命令
查看>>
每天一个linux命令,包含最常用的几十个命令的详细使用,让您快速掌握Linux!...
查看>>