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版本不兼容的更多相关文章

  1. 解决selenium与firefox版本不兼容问题

    Python环境下类比 个人使用 32位环境 Python 2.7.12 Selenium 2.53.6 Firefox 47.01 安装selenium可用pip选择对应版本,参考另一教程. 因为在 ...

  2. selenium与firefox版本不兼容

    报错信息: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port ...

  3. 解决selenium和FireFox版本不兼容问题

    相信很多同学刚接触selenium时,在Eclipse中打开fireFox浏览器时会报错:org.openqa.selenium.firefox.NotConnectedException: Unab ...

  4. selenium 与 firefox版本不兼容报错

    org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 ...

  5. 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 ...

  6. 解决Selenium与firefox浏览器版本不兼容问题

    因为在用java打开firefox浏览器的时候报错 org.openqa.selenium.firefox.NotConnectedException: Unable to connect to ho ...

  7. Selenium firefox 版本问题

    问题:Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms 原因: selenium-server-standalone-x. ...

  8. selenium ide几个版本和对应的firefox版本

    最近安装selenium ide折腾了好久,可能是目前还不太熟悉自动化脚本录制的一些知识. 通过最新版firefox59安装的selenium ide 3.0.2录制的脚本不能导出.于是下载了低版本的 ...

  9. selenium启动firefox、ie、chrome各浏览器方法

    1.启动firefox浏览器 a.如果你的本地firefox是默认路径安装的话,如下方式即可启动浏览器 WebDriver driver = new FirefoxDriver(); driver.g ...

随机推荐

  1. UIImageView的图片居中问题

    原文链接地址:http://www.ganlvji.com/?p=139 原文链接地址:http://blog.csdn.net/zhoutao198712/article/details/87620 ...

  2. LintCode "Coins in a Line III" !!

    https://codesolutiony.wordpress.com/2015/05/24/lintcode-coins-in-a-line-iii/ A very juicy one! Deser ...

  3. javascript url 相关函数(escape/encodeURL/encodeURIComponent区别)

    JS获取url参数及url编码.解码 完整的URL由这几个部分构成:scheme://host:port/path?query#fragment ,各部分的取法如下: window.location. ...

  4. Window下Nexus私服搭建

    项目组大部分人员不能访问maven的central repository,因此在局域网里找一台有外网权限的机器,搭建nexus私服,然后开发人员连到这台私服上  环境是:nexus-2.1.1.mav ...

  5. ios的runtime为什么可以动态添加方法

    一句话概括 每个instance都有一个isa,这个isa,里面含有所有的方法列表,ios提供库函数增加,修改,即实现了动态添加方法

  6. objective-c 下面int 和 NSData数据 互相转换的方法

    抄自这里 ; NSData *data = [NSData dataWithBytes: &i length: sizeof(i)]; int i; [data getBytes: & ...

  7. ASP.NET动态加载Js代码到Head标签中(三种方法)

    方法一代码如下: HtmlGenericControl Include2 = new HtmlGenericControl("script"); Include2.Attribut ...

  8. 初步理解MVC

    一.Asp.net WebForms 与Asp.net MVC 概念 Asp.net是创建WEB应用的框架,MVC是能够用更好的方法来组织并管理代码的一种更高级架构体系. 我们可将原来的Asp.net ...

  9. PLSQL_性能优化系列10_Oracle Array数据组优化

    2014-09-25 Created By BaoXinjian

  10. U8Bom查询

    select temp.*,Inventory.cInvCode,Inventory.cInvName,Inventory.cInvStd from ( select b.InvCode as 'PI ...