Selenium + Python + Firefox
按网上教程搭建好环境后,执行下面的代码出现了错误:
测试代码如下:
from selenium import webdriver
driver=webdriver.Firefox()
driver.get("http://www.baidu.com")
错误信息如下:
Traceback (most recent call last):
File "D:\pcode\24.py", line 2, in <module>
driver=webdriver.Firefox()
File "D:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py",
line 59, in __init__
self.binary, timeout),
File "D:\Python27\lib\site-packages\selenium\webdriver\firefox\extension_conne
ction.py", line 47, in __init__
self.binary.launch_browser(self.profile)
File "D:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.
py", line 61, in launch_browser
self._wait_until_connectable()
File "D:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.
py", line 105, in _wait_until_connectable
self.profile.path, self._get_firefox_output()))
selenium.common.exceptions.WebDriverException: Message: "Can't load the profile.
Profile Dir: c:\\users\\admin\\appdata\\local\\temp\\tmp5jpwrx Firefox output
: *** LOG addons.xpi: startup\r\n*** WARN addons.xpi: Ignoring missing add-on in
解决办法:卸载28版本的Firefox,安装24版本的
网上其他人推荐的办法:pip install -U selenium
Selenium + Python + Firefox的更多相关文章
- selenium + python + firefox 测试环境的搭建与配置
对于做UI自动化,如果是纯编写一段自动化测试程序,那么后续的维护成本会较高.这种情况下,借助 selenium 这款自动化系测试工具,辅助于自己编写部分脚本,将是个不错的选择.selenium 本身支 ...
- Selenium+python+shell+crontab+firefox
最近在尝试一个自动打卡的脚本,发现了几个问题,特此记录一下. 环境: Ubuntu 12.04.4 LTS selenium 2.43.0 firefox 32.0.3 1 本来机器上selenium ...
- python中用selenium调Firefox报错问题
python在用selenium调Firefox时报错: Traceback (most recent call last): File "G:\python_work\chapter11 ...
- Selenium+Python:下载文件(Firefox 和 Chrome)
引自 https://blog.csdn.net/Momorrine/article/details/79794146 1. 环境 操作系统 Win10 IDE Eclipse (Oxyg ...
- 7.解决在python中用selenium启动FireFox浏览器启动不了的方法
首次在利用python中的selenium启动FireFox浏览器时可能碰到如下问题 当输入如下代码时: from selenium import webdriver brower=webdriver ...
- Selenium启动Firefox示例(python版)
目前做selenium自动化使用的主流语言分为java和python,前一篇为java版,本篇介绍python实现selenium启动Firefox. 1 #-*- coding:utf-8 -*- ...
- selenium + python自动化测试环境搭建
selenium的在python平台的搭建: 搭建平台windows 准备工具如下: --------------------------------------------------------- ...
- Page Object Model (Selenium, Python)
时间 2015-06-15 00:11:56 Qxf2 blog 原文 http://qxf2.com/blog/page-object-model-selenium-python/ 主题 Sel ...
- selenium和Firefox版本不兼容
selenium8.py coding = utf-8 from selenium import webdriver driver = webdriver.Firefox() driver.get(' ...
随机推荐
- 多线程中的join总结笔记
join方法的原理 就是调用相应线程的wait方法进行等待操作的,假如线程1中调用了线程2的join方法,则相当于在线程1中调用了线程2的wait方法,当线程2执行完(或者到达等待时间),线程2会自动 ...
- git rebase 合并提交 解决超过100M文件的提交不能推送问题
git log 现在可以看到有3个提交: change 1.mp4 size to small //发现不能推送,又改回小于100M add 1.mp4 big 改变为超过100M add 1.mp4 ...
- tomcat8 web工程启动,登陆页面失败问题解决
编辑该文件context.xml 增加以下内容 <CookieProcessor className="org.apache.tomcat.util.http.LegacyCookie ...
- Structs复习 命名空间
引入jar包 web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app version= ...
- VC++ 自定义控件的建立及使用方法
一.VC++定义自定义控件与delphi,VB有些差异. delphi,vb在 file-new-other中建立.vc++在工具栏中就有自定义控件,但必须加入控件类型. 许多书籍都在类向导中建立.我 ...
- Windows Server 2012开启磁盘性能计数器
Windows Server 2012默认情况下已经禁用了磁盘性能计数器,打开任务管理器后,无法像Win8一样在性能选项卡中看到“磁盘”使用情况,可能是因为微软考虑到安装此服务器系统的硬件都会非常好, ...
- SAP 费用
SAP在华真相:天价收费与用户之灾 SAP真的是企业实施ERP系统的最佳选择吗? 画皮SAP-世界管理软件公司的中国真相 你知道SAP吗?哦,知道,满大街都是嘛,S-P-A,SPA.做出上述回答的是一 ...
- HTTP中的Get与Post
Http定义了与服务器交互的不同方法,最基本的方法有4种,分别是GET,POST,PUT,DELETE.URL全称是资源描述符,我们可以这 样认为:一个URL地址,它用于描述一个网络上的资源,而HTT ...
- echart生成饼状图
//绘制图表. echarts.init(document.getElementById('main')).setOption({ tooltip : { trigger: 'item', //触发类 ...
- akka之种子节点
AKKA提供的cluser功能能够很便捷的创建一个分布式应用,在使用cluster时需要配置seed nodes节点,这里对seed nodes节点做一下介绍. AKKA seed nodes 和普通 ...