qileilove

blog已经转移至github,大家请访问 http://qaseven.github.io/

Selenium支持高版本的FireFox

 今天写个自动刷新页面的脚本,发现在启动firefox的时候,出现一个类似如下的错误:
请在文本框输入文字15:22:12.031 WARN - GET /selenium-server/driver/?cmd=getNewBrowserSession&1=*fir
efox&2=http://www.google.com HTTP/1.1
java.lang.RuntimeException: Firefox refused shutdown while preparing a profile
at org.openqa.selenium.server.browserlaunchers.FirefoxCustomProfileLaunc
her.waitForFullProfileToBeCreated(FirefoxCustomProfileLauncher.java:277)
  后来查了google发现问题是selenium不支持高版本firefox, 解决方案如下:
  1、用winrar打开selenium-server.jar;
  2、查找两个目录:customProfileDirCUSTFFCHROME和customProfileDirCUSTFF;
  3、搜索每个目录,对每个文件install.rdf,编辑如下行:
  修改
<!-- Firefox -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>1.4.1</em:minVersion>
<em:maxVersion>3.5.*</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Firefox -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>1.4.1</em:minVersion>
<em:maxVersion>3.6.*</em:maxVersion>
</Description>
</em:targetApplication>
  还可以改得更加大,那么就可以支持4.0 的firefox了

posted on 2014-06-16 10:19 顺其自然EVO 阅读(3360) 评论(0)  编辑  收藏 所属分类: selenium and watir webdrivers 自动化测试学习


只有注册用户登录后才能发表评论。


网站导航:
 
<2014年6月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

导航

统计

常用链接

留言簿(55)

随笔分类

随笔档案

文章分类

文章档案

搜索

最新评论

阅读排行榜

评论排行榜