Python Selenium 启动新版本Firefox失败问题解决方案
来源:互联网 发布:index=0 c语言 编辑:程序博客网 时间:2024/05/29 06:34
Firefox 45版本以上使用selenium-3.0.1无法直接启动需要如下步骤:
(1) 下载geckodriver.exe
https://github.com/mozilla/geckodriver/releases
解压后放置到
1.查看C:\Python27\Lib\site-packages\selenium\webdriver\firefox中的webdriver.py,在def_init_函数中,executable_path="geckodriver",之前搭建的环境上是executable_path="wires";
2.geckodriver是一原生态的第三方浏览器,对于selenium3.x版本都会使用geckodriver来驱动firefox,所以需要下载geckodriver.exe,下载地址:https://github.com/mozilla/geckodriver/releases
3.放在C:\Python27(查看环境变量path中是否添加C:\Python27该路径)、
(2)
from selenium import webdriver
fromselenium.webdriver.common.desired_capabilities import DesiredCapabilities
fromselenium.webdriver.firefox.firefox_binary import FirefoxBinary
binary = FirefoxBinary(r'C:\ProgramFiles (x86)\Mozilla Firefox\firefox.exe')
driver =webdriver.Firefox(firefox_binary=binary)
driver.get('http://www.google.com')
Firefox 45版本以上使用selenium-3.0.1无法直接启动需要如下步骤:
(1) 下载geckodriver.exe
https://github.com/mozilla/geckodriver/releases
解压后放置到
1.查看C:\Python27\Lib\site-packages\selenium\webdriver\firefox中的webdriver.py,在def_init_函数中,executable_path="geckodriver",之前搭建的环境上是executable_path="wires";
2.geckodriver是一原生态的第三方浏览器,对于selenium3.x版本都会使用geckodriver来驱动firefox,所以需要下载geckodriver.exe,下载地址:https://github.com/mozilla/geckodriver/releases
3.放在C:\Python27(查看环境变量path中是否添加C:\Python27该路径)、
(2)
from selenium import webdriver
fromselenium.webdriver.common.desired_capabilities import DesiredCapabilities
fromselenium.webdriver.firefox.firefox_binary import FirefoxBinary
binary = FirefoxBinary(r'C:\ProgramFiles (x86)\Mozilla Firefox\firefox.exe')
driver =webdriver.Firefox(firefox_binary=binary)
driver.get('http://www.google.com')
- Python Selenium 启动新版本Firefox失败问题解决方案
- Python Selenium 启动新版本Firefox失败问题解决方案
- Python-selenium-Firefox-chrome-IE问题解决方法
- Python-selenium-Firefox-chrome-IE问题解决方法
- selenium启动Firefox示例
- python的selenium的带https安全隐私问题解决方案
- python selenium启动不了火狐浏览器(firefox)的解决办法
- Python+Selenium,使用WebDriver启动Firefox,但不打开URL
- python爬虫,selenium使用,Firefox-chrome-IE问题解决方法,selenium的基本操作
- python+selenium firefox 驱动
- python selenium firefox
- ubuntu 14 关于vpn服务启动失败的问题解决方案
- Android ADB 启动失败,端口占用问题解决方案
- Selenium server 启动失败
- Selenium python 启动firefox浏览器的异常selenium.common.exceptions.WebDriverException: Message: 'geckodriver'
- selenium 启动firefox浏览器问题
- Selenium+Python浏览器调用:Firefox
- Mysql启动失败问题解决
- angularjs2 学习笔记(一) 开发环境搭建 (vs2013)
- 学习运维——网络管理基础
- 在linux 上安装chrome 谷歌浏览器
- 【深度学习:CNN】Dropout解析(1)
- Java Thread线程
- Python Selenium 启动新版本Firefox失败问题解决方案
- Geometric_tools_Engine “unable to create WIC imaging factory“” 问题解决
- 【C/C++】关于修饰函数关键字 __declspec,__cdecl,__stdcall,__declspec
- NYOJ 43 24 Point game
- RecyclerView 点击位置错乱问题
- 简单记录 gitlab 本地安装过程
- ===如何测试直播软件===
- 我的生活(-)-童年回顾
- jvm参数(调优)+jvm内存的年轻代/老年代/持久代