使用selenium做自动化检测时报异常

异常如下:

org.openqa.selenium.InvalidElementStateException: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsINativeMouse.click]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///C:/Users/jzheng/AppData/Local/Temp/anonymous2759928925516801350webdriver-profile/extensions/fxdriver@googlecode.com/components/command_processor.js :: <TOP_LEVEL> :: line 9659"  data: no]
Command duration or timeout: 114 milliseconds
Build info: version: '2.28.0', revision: '18309', time: '2012-12-11 20:21:18'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_33'
Session ID: c458e208-7f45-42fe-b4d0-5f7f32e36ec3
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, browserName=firefox, rotatable=false, locationContextEnabled=true, version=17.0.7, cssSelectorsEnabled=true, databaseEnabled=true, handlesAlerts=true, browserConnectionEnabled=true, nativeEvents=true, webStorageEnabled=true, applicationCacheEnabled=true, takesScreenshot=true}]

。。。。

原先用了click 来完成,报错了,后面发现selenium自带有选择下拉单的方法,没再报错

转载于:https://www.cnblogs.com/zhuojiniao/p/3245393.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值