Selenium设定速度执行测试

Tom*_*ffi 3 java selenium automated-tests selenium-ide

我们使用Selenium IDE来记录测试.在录音机中我们可以改变速度执行,我们的测试通过.我们应该将速度设置为SLOW.

我使用ANT启动HTML Suite测试.

问题是我们必须设置测试的执行速度.

哪个是设置此属性的正确参数?存在什么东西设置它?

<target name="run-selenium-tests">
    <echo message="Using browser = ${browser} "/>
    <taskdef resource="selenium-ant.properties" classpathref="class.path">
    </taskdef>
    <java jar="${acceptance.test.lib.dir}/selenium-server-standalone-2.0rc3.jar" fork="true">
        <arg line="-htmlSuite ${browser}"/>
        <arg line="http://myserver:8080/"/>
        <arg line="../sampletest/selenium/my_test.html"/>
        <arg line="../sampletest/selenium/report/results.html"/>
        <arg line="-timeout 1000"/>
    </java>
</target>
Run Code Online (Sandbox Code Playgroud)

有人可以帮助我们吗?

谢谢!

lAH*_*2iV 6

您可以使用以下selenium命令来降低执行速度

    setSpeed(value in milliseconds)
Run Code Online (Sandbox Code Playgroud)

每次执行命令后,此命令将等待指定的值.