【发布时间】:2010-09-02 15:55:48
【问题描述】:
在Selenium RC testing with Maven 中部分回答了问题 - 基本上说明回到使用 Firefox 3.5(但一个答案表明这不起作用)。无论如何都不是一个选项 - 我们正在使用 3.6.8。
无论如何,关于如何让 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 配置文件...
ERROR [org.openqa.selenium.server.BrowserSessionFactory] 无法启动新的浏览器会话,关闭浏览器并清除所有会话数据 java.lang.RuntimeException:Firefox 在准备配置文件时拒绝关机
原因: org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher$FileLockRemainedException:锁定文件仍然存在! C:\DOCUME~1\XXX\LOCALS~1\Temp\customProfileDirb809d85d6d064be0bdd1a4ee68035cbb\parent.lock 在 org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFileLockToGoAway(FirefoxChromeLauncher.java:269)
【问题讨论】:
-
这仍然是 Selenium 2.0b3 的问题吗?