Python Selenium 启动新版本Firefox失败问题解决方案
2017-01-18 10:23
495 查看
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')
(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 selenium3启动不了firefox的问题
- 【转】SQL2005无法启动SQL Server 请求失败或服务未及时响应等问题的解决方案
- Python-Selenium2做Web自动化测试(6)-解决使用Webdrive打开Firefox不含有插件的问题
- 智能一代云平台(十一):Eclipse启动项目报启动上下文失败问题解决方案总结
- python+selenium启动firefox和chrome
- python3.6安装pyspider出现的问题(pycurl安装失败)和解决方案
- Python-selenium-Firefox-chrome-IE问题解决方法
- python爬虫,selenium使用,Firefox-chrome-IE问题解决方法,selenium的基本操作
- Python-selenium-Firefox-chrome-IE问题解决方法
- 彻底解决selenium启动firefox时总弹框的问题
- selenium 启动firefox浏览器问题
- selenium_python系列之二 Python启动浏览器Firefox\Chrome\IE
- Python+selenium定位不到元素的问题及解决方案
- 解决selenium-RC无法启动firefox浏览器进行java测试脚本的问题
- (selenium 小知识点)解决使用Webdrive打开Firefox不含有插件的问题(python)
- Windows环境下使用python selenium 打开Firefox的问题总结
- selenium3+python2.7启动Firefox 53提示:socket.error: [Errno 10054]