您的位置:首页 > 其它

selenium server如何支持高版本firefox

2011-08-29 11:08 274 查看
基于selenium测试firefox页面内容,发现跑测试脚本的时候selenium sever 总是hang在

Preparing Firefox profile...这里就不动了,firefox启动不了,测试脚本也迟迟不能运行。

我用的是selenium-remote-control-1.0.1-dist这个版本,

google下发现问题是selenium不支持高版本firefox, 解决方案如下:

 1、用winrar或7ZIP打开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>4.*</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>4.*</em:maxVersion>

            </Description>

        </em:targetApplication>

 

还可以改得更加大,那么就可以支持更高的firefox版本了。改完后firefox被成功启动。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息