selenium和Firefox版本不兼容
selenium8.py
coding = utf-8
from selenium import webdriver
driver = webdriver.Firefox()
driver.get('http://www.baidu.com')
print (driver.title)
driver.quit()
运行报错:
Python 3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 10:37:12) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
================================ RESTART ================================
Traceback (most recent call last):
File "C:\Python33\selenium8.py", line 3, in
driver = webdriver.Firefox()
File "C:\Python33\lib\site-packages\selenium-2.45.0-py3.3.egg\selenium\webdriver\firefox\webdriver.py", line 59, in init
self.binary, timeout),
File "C:\Python33\lib\site-packages\selenium-2.45.0-py3.3.egg\selenium\webdriver\firefox\extension_connection.py", line 47, in init
self.binary.launch_browser(self.profile)
File "C:\Python33\lib\site-packages\selenium-2.45.0-py3.3.egg\selenium\webdriver\firefox\firefox_binary.py", line 66, in launch_browser
self._wait_until_connectable()
File "C:\Python33\lib\site-packages\selenium-2.45.0-py3.3.egg\selenium\webdriver\firefox\firefox_binary.py", line 105, in _wait_until_connectable
raise WebDriverException("Can't load the profile. Profile "
selenium.common.exceptions.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版本是selenium-2.45.0,安装的fireFox最新的47版本,结果就报错了。
fireFox更新的快,但是selenium总是慢半拍。
反正现在是学习嘛,换FireFox版本吧
也不知道selenium-2.45.0,到底支持哪个版本的FireFox,百度搜索到一篇之前的文章说selenium-2.45.0,新发布了,支持FireFox36
一下子降低了11个版本号,好吧,反正是学习。
卸载新的FireFox,安装了36的版本。
接着运行:
================================ RESTART ================================
百度一下,你就知道
看来是通过了。
那么接下来就是学习selenium了,嘿嘿。又前进了一步!!
selenium和Firefox版本不兼容的更多相关文章
- 解决selenium与firefox版本不兼容问题
Python环境下类比 个人使用 32位环境 Python 2.7.12 Selenium 2.53.6 Firefox 47.01 安装selenium可用pip选择对应版本,参考另一教程. 因为在 ...
- selenium与firefox版本不兼容
报错信息: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port ...
- 解决selenium和FireFox版本不兼容问题
相信很多同学刚接触selenium时,在Eclipse中打开fireFox浏览器时会报错:org.openqa.selenium.firefox.NotConnectedException: Unab ...
- selenium 与 firefox版本不兼容报错
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 ...
- Selenium2学习-007-WebUI自动化实战实例-005-解决 Firefox 版本不兼容:org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary
此文主要讲述 Java 运行 Selenium 脚本时,因 Friefox 浏览器版本与 selenium-server-standalone-x.xx.x.jar 不兼容引起的 org.openqa ...
- 解决Selenium与firefox浏览器版本不兼容问题
因为在用java打开firefox浏览器的时候报错 org.openqa.selenium.firefox.NotConnectedException: Unable to connect to ho ...
- Selenium firefox 版本问题
问题:Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms 原因: selenium-server-standalone-x. ...
- selenium ide几个版本和对应的firefox版本
最近安装selenium ide折腾了好久,可能是目前还不太熟悉自动化脚本录制的一些知识. 通过最新版firefox59安装的selenium ide 3.0.2录制的脚本不能导出.于是下载了低版本的 ...
- selenium启动firefox、ie、chrome各浏览器方法
1.启动firefox浏览器 a.如果你的本地firefox是默认路径安装的话,如下方式即可启动浏览器 WebDriver driver = new FirefoxDriver(); driver.g ...
随机推荐
- 【linux】wc命令
Linux系统中的wc(Word Count)命令的功能为统计指定文件中的字节数.字数.行数,并将统计结果显示输出. 1.命令格式: wc [选项][文件] 2.命令参数: -c char统计字节数. ...
- Linux中升级更新命令yum upgrade和yum update的区别
区别 Linux升级命令有两个分别是yum upgrade和yum update, 这个两个命令是有区别的: 代码如下: yum -y update #升级所有包,同时也升级软件和系统内核 yum - ...
- Avant Browser
Avant Browser Avant 浏览器友好的用户界面为你的网络冲浪带来全新的效率和透明性.软件版本的不断升级使产品的可靠性稳步提高. 没有广告.没有恶意软件! Avant 浏览器是免费的.10 ...
- C#委托和事件讲解
委托 和 事件在 .Net Framework中的应用非常广泛,然而,较好地理解委托和事件对很多接触C#时间不长的人来说并不容易.它们就像是一道槛儿,过了这个槛的人,觉得真是太容易了,而没有过去的人每 ...
- 嵌入式设计模式:有限状态自动机的C语言实现
转自:http://www.cnblogs.com/autosar/archive/2012/06/22/2558604.html 状态机模式是一种行为模式,在<设计模式>这本书中对其有详 ...
- python3 写文件
#coding:utf-8 wfile = open('test.txt','w') str=''' 在广大玩家的要求下这款修改器诞生 了,这首先要归功于太阁狂人_Cath_Sean 的大力支持,这款 ...
- JVM 类型的生命周期学习
Java虚拟机通过装载.连接和初始化一个JAVA类型,使该类型可以被正在运行的JAVA程序所使用,其中,装载就是把二进制形式的JAVA类型读入JAVA虚拟机中:而连接就是把这种读入虚拟机的二进制形式的 ...
- MongoDB 3.0.6的主,从,仲裁节点搭建
在MongoDB所在路径创建log和data目录mkdir logmkdir data 在data目录下 创建master.slaver.arbiter路径 mkdir master mkdir sl ...
- EditText获取焦点显示输入法时布局自动改变的解决方案
最近在调试Android时,发现当屏幕下方的EditText获取焦点,显示输入法时候.页面布局重新调整而不是整体上移.导致部分控件显示不完全. 最终解决方案是修改项目AnroidManifest.xm ...
- JAVA 创建类,使用类
一.创建类: Test.java //定义类 public class Test{ //属性 String name; String gender; int age; //方法,无参无返回 publi ...