Question partly answered in Selenium RC testing with Maven – basically stating go back to using Firefox 3.5 (but one answer suggesting that does not work). Not an option anyway – 3.6.8 is what we are using.
Anyway, any clue on how to get Maven / Selenium working with Firefox 3.6.x?
I am attempting to use:
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium</artifactId>
<version>2.0a5</version>
</dependency>
For dependent Java classes used in the tests.
And:
<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>
When I run integration-test against Firefox, I get:
INFO [org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher] Preparing Firefox profile…
ERROR [org.openqa.selenium.server.BrowserSessionFactory] Failed to start new browser session, shutdown browser and clear all session data
java.lang.RuntimeException: Firefox refused shutdown while preparing a profile
Caused by:
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher$FileLockRemainedException: Lock file still present! C:\DOCUME~1\XXX\LOCALS~1\Temp\customProfileDirb809d85d6d064be0bdd1a4ee68035cbb\parent.lock
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFileLockToGoAway(FirefoxChromeLauncher.java:269)
I’ve had a problem with firefox and Selenium RC.
The solution was to edit the selenium RC jar files. Open them up in WINRAR (or similar) and browse through the folders for
Open up the files you see called “Install.rdf”
And see where it says MaxVersion? Bump that up to say … 4.6
Save the file and overwrite the original install.rdf in the .jar
Then… selenium is happy.
I really apologise for wating your time if this doesn’t work. It was a hack that I found after a few hours / days of scrambling.
…
EDIT
…
Oh beans I just read the error message from above. Nowhere near the same issue. Yours is something to do with a lockfile or previous firefox session.
Tried a clear history/reset to factory defaults in the browser and similar?