selenium报错汇总

 

报错:[error] Could not connect to Selenium Server. Have you started the Selenium Server yet?
解决:selenium两种驱动方式,一是use selenium IDE,一种是use selenium webdriver。在options里去掉勾选enable webdriver playback即可。
Google答案地址。
 
问题:seleniumIDE录制时遇到新开窗口的链接_blank,回访时会出现焦点扔停留在旧窗口下,无法操作新窗口,报错无法找到页面元素?
解决:使用selectPopUp命令,选择弹出窗口,然后继续下一步操作即可。
 
 
报错:raceback (most recent call last):
  File "C:\Users\Administrator\Desktop\selenium\chrome.py", line 4, in <module>
    driver=webdriver.Firefox()
  File "C:\Python27\lib\selenium\webdriver\firefox\webdriver.py", line 59, in __init__
    self.binary, timeout),
  File "C:\Python27\lib\selenium\webdriver\firefox\extension_connection.py", line 47, in __init__
    self.binary.launch_browser(self.profile)
  File "C:\Python27\lib\selenium\webdriver\firefox\firefox_binary.py", line 66, in launch_browser
    self._wait_until_connectable()
  File "C:\Python27\lib\selenium\webdriver\firefox\firefox_binary.py", line 105, in _wait_until_connectable
    raise WebDriverException("Can't load the profile. Profile "
WebDriverException: Message: Can't load the profile. Profile Dir: %s If you specified a log_file in the FirefoxBinary constructor, check it for details.
 
解决:外国网友说是selenium和firefox不兼容,需要倒退firefox的版本
 

报错:[error] Could not connect to Selenium Server. Have you started the Selenium Server yet?
解决:启用服务java -jar C:\seleniumRC\selenium-server-1.0.3\selenium-server-standalone-2.45.0.jar
如果启用失败,查看端口netstat -ano 关闭被占用的端口。

转载于:https://www.cnblogs.com/yuer20180726/p/10811802.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值