Selenium支付高版本的FireFox

发表于:2014-6-13 10:35

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:小毛驴    来源:51Testing软件测试网采编

  今天写个自动刷新页面的脚本,发现在启动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了
《2023软件测试行业现状调查报告》独家发布~

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号