webdriver调用phantomJS报错
来源:互联网 发布:Apache set cookie 编辑:程序博客网 时间:2024/05/18 22:44
运行Python文件时报错情况如下:
raise WebDriverException(“Can not connect to the Service %s” % self.path)
selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service phantomjs
先查看环境变量的路径是否都添加正确,或者程序中指定的路径是否正确
eg:driver=webdriver.PhantomJS(executable_path=’E:\PhantomJS211\bin\phantomjs.exe’)若路径没有问题,则检查hosts文件配置
2.1 如果更改过初始的hosts文件,则直接将初始hosts文件更改回来就行。因为我以前为了翻墙更改过hosts文件,所以才出现这个问题,解决办法就是直接把hosts文件改回来。
2.2 以下办法是我在查找解决这个报错问题的时候看到网上的解决方案:
这样重新运行程序,报错就消失啦~
阅读全文
0 0
- webdriver调用phantomJS报错
- selenium+phantomjs 报错备注
- PhantomJS编译报错 ICU disabled解决
- WebDriver - 伪浏览器PhantomJs(ghost driver) HtmlUnit
- webdriver启动IE浏览器_报错
- webdriver.close 报错问题 解决方案
- java 调用 phantomjs
- PhantomJS其他语言调用
- java调用phantomjs
- 用webdriver+phantomjs实现无浏览器的自动化
- Java实现爬取网页数据:PhantomJS+Webdriver
- 用webdriver+phantomjs实现无浏览器的自动化过程
- selenium-webdriver 关于测试新打开页面报错解决办法
- webdriver 实例 IE8报错:Unexpected error launching Internet Explorer
- 使用 webdriver报错 ElementNotInteractableException: Message: 的解决办法
- selenium报错ImportError: cannot import name 'webdriver'
- 关于webdriver定位元素,报错无法点击
- 使用selemium Remote调用firefox报"WebDriver: Cannot find firefox binary in PATH."的解决办法
- 【BZOJ1008】越狱(HNOI2008)-快速幂
- Http和Https区别
- C语言基础(三)(数组)
- [Kafka]
- Spring Boot 中使用 @Transactional 注解配置事务管理
- webdriver调用phantomJS报错
- python django传参
- Python在测试中的用途
- On my arrival at the Casa Angello I found no one there but Bianca, who was
- hdu 1358
- 第三方登录 (微博登录 web)
- [Kafka]
- [JS]转换驼峰命名
- 分答项目_知识点:分答微信h5支付