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(' ...
随机推荐
- CentOS 6.x 默认源中带了mysql-server,可以使用yum安装。
1.执行安装命令:yum install mysql-server 2.初始化数据库,使用命令1# service mysqld start 启动MSQL service mysqld stop ...
- Delphi实现图像文本旋转特效完整代码
Delphi实现图像文本旋转特效完整代码,本程序利用的控件主要是Panel 控件.Image 控件.Edit 控件.Label 控件和Button 控件.本程序的关键是利用Delphi 的bmp_ro ...
- 学JS的心路历程Day28 - PixiJS -基础(二)
材质暂存(texture cache) 昨天有说到,图片要放入stage前,需要先把图片转成Sprite的特殊图片物件. 但是我们也可以先将图片放进材质暂存(texture cache). 什么是「材 ...
- Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans.xsd'
明明项目没错误,但application.xml就报了错误,这是什么问题呢? 问题在于我们找不到org/springframework/beans/spring-beans这个包,也就是我们的spri ...
- JS----贪吃蛇游戏
在网上找到的几种例子 <!DOCTYPE html> <html > <head> <meta http-equiv="Content-Type&q ...
- 2018面向对象程序设计(Java)第14周学习指导及要求
2018面向对象程序设计(Java)第14周学习指导及要求(2018.11.29-2018.12.2) 学习目标 (1) 掌握GUI布局管理器用法: (2) 掌握各类Java Swing组件用途及 ...
- linux服务不支持chkconfig的解决
服务不支持chkconfig的解决 写了脚本,想用命令chkconfig加载自启动.提示xxxxxxx服务不支持chkconfig",原来是自己写的脚本时,忘记写两行了.开头一般要这样写 # ...
- PasteDeploy部署Pecan API 服务
part 1:请求处理 使用PasteDeploy模块来实现 WSGI Services 时,都需要加载一个 paste.ini 文件,文件用来定义服务过滤和请求路由,类似于springMvc的拦截器 ...
- ssm 连接两个数据库
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...
- JMeter (二十)参数化、检查点、集合点(转载)
转载自 http://www.cnblogs.com/yangxia-test 参数化:简单的来理解一下,我们录制了一个脚本,这个脚本中有登录操作,需要输入用户名和密码,假如系统不允许相同的用户名和密 ...