selenium2 浏览器版本问题
一、chrome浏览器
chrome浏览器与驱动版本对应关系
----------ChromeDriver v2.26 (2016-12-09)----------
Supports Chrome v53-55 ----------ChromeDriver v2.25 (2016-10-25)----------
Supports Chrome v53-55 ----------ChromeDriver v2.24 (2016-09-09)----------
Supports Chrome v52-54 ----------ChromeDriver v2.23 (2016-08-04)----------
Supports Chrome v51-53 ----------ChromeDriver v2.22 (2016-06-06)----------
Supports Chrome v49-52 ----------ChromeDriver v2.21 (2016-01-28)----------
Supports Chrome v46-50 ----------ChromeDriver v2.20 (2015-10-08)----------
Supports Chrome v43-48 ----------ChromeDriver v2.19 (2015-08-28)----------
Supports Chrome v43-47 ----------ChromeDriver v2.18 (2015-08-19)----------
Supports Chrome v43-46
二、firefox浏览器版本的问题
Firefox 48+需要驱动
原文链接:https://github.com/SeleniumHQ/selenium/issues/2739
Every case here appears to be that where everyone is attempting to use Firefox 48 (or greater) with the 'old' FirefoxDriver implementation.
If you are using Firefox 48+ you need to use GeckoDriver://Firefox 48+版本需要配合使用GeckoDriver+selenium3+python3,之前的版本使用selenium2(自带Firefox浏览器的driver)。
https://github.com/mozilla/geckodriver
The old FirefoxDriver by the selenium project no longer works due to extension signing and mozilla's refusal to sign it. But even if they did sign it, or one used an 'unbranded' build of firefox, the extension will likely stop working soon due to other changes to Firefox.
Which is why in 3.0 beta releases (they are marked as beta in pypi, why a pip install -U will not pick it up), webdriver.Firefox will default to using Mozilla's geckodriver. Similar to chromedriver / IEDriverServer / EdgeDriver / phantomjs. It is a separate binary on your system that you need to download and put on your system path.
There are quite a few issues with using Firefox 48 and GeckoDriver, that are fixed in FirefoxNightly. I would recommend attempting to see how well your test suite does with FirefoxNightly when trying to switch to GeckoDriver.
To continue to use the old FirefoxDriver on FF 47.0.1 or earlier versions (excluding 47.0 ~ which doesn't work with selenium), you should be setting the DesiredCapability "marionette": False:
driver = webdriver.Firefox(capabilities={"marionette":False})
If you believe you are receiving this error other than a version mismatch with Firefox and the driver implementation issue, then please log a new issue.
I've adjusted the error message in 649b118 but I fear that will not do enough to help users.
This address isn't valid问题
使用selenium2打开一个Firefox浏览器时,会提示this address isn't valid。这里给出解决方法。
原文链接:https://support.mozilla.org/zh-CN/questions/1046778
Do a clean reinstall and delete the Firefox program folder before (re)installing a fresh copy of the current Firefox release.//重新安装Firefox浏览器,一定要卸载干净。
- Download the full Firefox installer and save the file to the desktop
https://www.mozilla.org/en-US/firefox/all/
If possible uninstall your current Firefox version to cleanup the Windows registry and settings in security software.
- Do NOT remove "personal data" when you uninstall your current Firefox version, because this will remove all profile folders and you lose personal data like bookmarks and passwords including data in profiles created by other Firefox versions.//profile文件内的个人数据可以保留。
Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.//卸载后,如果遗留下面文件夹,那么需要删除掉。
- (32 bit Windows) "C:\Program Files\Mozilla Firefox\"
- (64 bit Windows) "C:\Program Files (x86)\Mozilla Firefox\"
- It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
- http://kb.mozillazine.org/Uninstalling_Firefox
Your bookmarks and other personal data are stored in the Firefox profile folder and won't be affected by an uninstall and (re)install, but make sure NOT to remove personal data when you uninstall Firefox as that will remove all Firefox profile folders and you lose your personal data.
If you keep having problems then also create a new profile.//如果重新安装Firefox后,还是存在问题,那么需要指定一个profile。
例如:
profile = webdriver.FirefoxProfile('C:/Users/pdmi/AppData/Roaming/Mozilla/Firefox/Profiles/8j5oylq6.default')
driver = webdriver.Firefox(firefox_profile=profile)
selenium2 浏览器版本问题的更多相关文章
- IE浏览器版本判断 HTML代码
<!--[if IE 6.0]> <div id="noie6" style="z-index: 20002;border: 1px solid #F7 ...
- js判断浏览器类型以及浏览器版本
判断浏览器类型: if navigator.userAgent.indexOf(”MSIE”)>0) {} //判断是否IE浏览器 if(isFirefox=navigator.userAg ...
- javascript判断手机浏览器版本信息
<script type="text/javascript"> /* * 智能机浏览器版本信息: * */ var browser={ versions:functio ...
- .NET 获取客户端的操作系统版本、浏览器版本和IP地址
我们在使用.NET做网站的时候,很多情况下需要需要知道客户端的操作系统版本和浏览器版本,怎样获取客户端的操作系统和浏览器版本呢?我们可以通过分析UserAgent来获取. .NET 获取客户端的操作系 ...
- 设置默认访问项目的客户端的浏览器版本(IE版本)
在项目开发部署中,发现浏览器不兼容现象,在不处理兼容性情况下让用户更好体验(IE浏览器) 我们来设置客户端默认访问项目的浏览器版本 如下所示的是不同IE版本下的效果截图比较: IE5.IE6下: IE ...
- js,onblur后下一个控件获取焦点判断、html当前活跃控件、jquery版本查看、jquery查看浏览器版本、setTimeout&setInterval
需求: input控件在失去焦点后直接做验证,验证通不过的话,显示相应错误.但是如果失去焦点后点击的下个控件是比较特殊的控件(比如,退出系统),那么不执行验证操作,直接退出系统(防止在系统退出前,还显 ...
- [JavaCore] 微信手机浏览器版本判断
公司要做微支付,微信浏览器版本要大于5 package com.garinzhang.web.weixin; import org.apache.commons.lang.StringUtils; i ...
- js判断IE浏览器版本
if(navigator.userAgent.indexOf("MSIE")>0){ if(navigator.userAgent.indexOf("MSIE 6. ...
- js实现判断浏览器版本
//判断浏览器版本是否过低 var ua = navigator.userAgent.toLowerCase(); if (window.ActiveXObject) var IEversion = ...
随机推荐
- poj 1573(搜索)
Robot Motion Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 12351 Accepted: 5982 Des ...
- LeetCode OJ--Next Permutation *
求一个排列的下一个排列. 1,2,3 → 1,3,23,2,1 → 1,2,31,1,5 → 1,5,1 #include <iostream> #include <vector&g ...
- Codeforces Gym101606 D.Deranging Hat (2017 United Kingdom and Ireland Programming Contest (UKIEPC 2017))
D Deranging Hat 这个题简直了,本来想的是冒泡排序然后逆着输出来的,后来发现不对,因为题目上求的是最优解,而且冒泡的话,输出结果有的超出10000行了,所以就是把一开始的,排好序的字母标 ...
- 布斯(Steve Jobs)在斯坦福大学的演讲稿,中英文对照版
2005年6月14日,苹果CEO史蒂夫·乔布斯(Steve Jobs)在他的母校斯坦福大学的毕业典礼发表了著名的演讲,关于这段演讲,你会看到N多人的推荐(比如同样喜欢在大学演讲的李开复先生).此前曾经 ...
- SilverLight:布局(2)GridSplitter(网格分割)垂直分割、水平分割
ylbtech-SilverLight-Layout: 布局(2)GridSplitter(网格分割)垂直分割.水平分割 A, Splitter(分割)对象之 GridSplitter(网格分割)1: ...
- C#串口通信发送数据
1 发送数据 需要2个串口 http://www.openedv.com/thread-228847-1-1.html 下载源文件 File_Protocol_Test.rar
- 阿里巴巴为什么主推HSF?比Dubbo有哪些优势?
作者:匿名用户链接:https://www.zhihu.com/question/39560697/answer/187538165来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请 ...
- 视图交互--表视图(UITableView)的cell交互析略
在表视图UITableView的cell上经常有一些交互,根据项目开发中的情况,需要对此进行一些规范.总结出了几种交互方法,这些方法在其他视图的交互上同样可以适用.用一个简单的例子来举例说明一下,其他 ...
- Unity Shaders and Effects Cookbook (3-4) 使用高光贴图
在学习完上一节之后.已经了解了在Unity 中怎样实现一个高光 Shader ,可是会有一个问题.就是效果看起来不切实际,如以下的问题 我用一张图片贴到了Cube上面.然后用了一个高光材质,得到了下图 ...
- [C++设计模式] proxy 代理模式
代理模式:为其它对象提供一种代理以控制对这个对象的訪问. Proxy: 保存一个引用使得代理能够訪问实体.若RealSubject和Subject的接口同样,Proxy会引用Subject,就相当于在 ...