部分地在Selenium RC testing with Maven回答的问题 - 基本上说回到使用Firefox 3.5(但一个答案表明不起作用)。反正也不是一个选项 - 我们正在使用3.6.8。如何让Maven在Firefox 3.6中运行Selenium测试?
无论如何,关于如何让Maven/Selenium与Firefox 3.6.x一起工作的任何线索?
我试图使用方法:
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium</artifactId>
<version>2.0a5</version>
</dependency>
对于在测试中使用相关的Java类。
和:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>1.1-SNAPSHOT</version>
<executions>
<execution>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
<configuration>
<background>true</background>
</configuration>
</execution>
<execution>
<id>stop-selenium</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop-server</goal>
</goals>
</execution>
</executions>
</plugin>
当我运行针对Firefox的集成测试,我得到:
INFO [org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher]准备的Firefox配置文件...
错误[org.openqa.selenium.server.BrowserSessionFactory]无法启动新浏览器会话,关闭浏览器并清除所有会话数据 java.lang.RuntimeException:在准备配置文件时Firefox拒绝关机
造成者: org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher $ FileLockRemainedException:锁定文件仍然存在! C:\ DOCUME〜1 \ XXX \ LOCALS在org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFileLockToGoAway(FirefoxChromeLauncher.java:269)〜1个\ TEMP \ customProfileDirb809d85d6d064be0bdd1a4ee68035cbb \ parent.lock
这是Selenium 2.0b3的问题吗? – Ardesco 2011-05-26 09:57:11