Selenium 不支持高版本firefox (转)

上一篇 / 下一篇  2014-05-22 19:26:30 / 个人分类:Selenium2

今天帮蓝蓝写个自动刷新页面的脚本,发现在启动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了


TAG:

引用 删除 SunnyLan   /   2016-07-29 14:15:36
5
liran_04的个人空间 引用 删除 liran_04   /   2014-05-23 17:06:07
3
 

评分:0

我来说两句

Open Toolbar