views:

159

answers:

3

I'm trying to run a series of selenium tests using maven and I get this error:

Running com.myapp.web.selenium.MySeleniumTest
WARN  [SocketListener0-1] HttpConnection - POST /selenium-server/driver/ HTTP/1.1
java.lang.RuntimeException: Firefox refused shutdown while preparing a profile
        at org.openqa.selenium.server.browserlaunchers.FirefoxCustomProfileLauncher.waitForFullProfileToBeCreated(FirefoxCustomProfileLauncher.java:27
7)
        at org.openqa.selenium.server.browserlaunchers.FirefoxCustomProfileLauncher.launch(FirefoxCustomProfileLauncher.java:147)
        at org.openqa.selenium.server.browserlaunchers.AbstractBrowserLauncher.launchRemoteSession(AbstractBrowserLauncher.java:24)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:587)
        .............
Caused by: org.openqa.selenium.server.browserlaunchers.FirefoxCustomProfileLauncher$FileLockRemainedException: Lock file still present! C:\DOCUME~1\Fl
orin\LOCALS~1\Temp\customProfileDir894171\parent.lock
        at org.openqa.selenium.server.browserlaunchers.FirefoxCustomProfileLauncher.waitForFileLockToGoAway(FirefoxCustomProfileLauncher.java:235)
        at org.openqa.selenium.server.browserlaunchers.FirefoxCustomProfileLauncher.waitForFullProfileToBeCreated(FirefoxCustomProfileLauncher.java:27

I'm using Firefox 3.6.8, selenium-java-client-driver 0.9.2 and selenium-server 0.9.2. I start the selenium server from the tests like this:

private static void initServer() throws Exception {
    String[] args = new String[]{"-port", String.valueOf(4444)};
    SeleniumServer.main(args);
}

It seems that the selenium profile is being locked and not released so that the subsequent tests can use it.

Thanks...

A: 

Can't speak on specifics, but I can relate I had some issues with Selenium tests on Firefox 3.6.(forget the version). When I reverted to the last 3.5 release, it worked as usual. If going back to an older firefox is not a big deal, might be worth a shot. Otherwise, not sure.

AHungerArtist
I reverted back to Firefox 3.5.11 but I still got the same error.
Florin
+1  A: 

Hi,

I had problems with the mvn selenium:selenese maven goal.

I discard using it because I think the selenium maven plugin comes with and older version of selenium RC.

The solution for me was to use the last Selenium RC release running outside maven as a standalone server and I run selenium tests as integration-tests

cues7a
A: 

The version of Selenium that you are using is actually quite old. Have you tried using the Selenium Maven plugin instead? In my experience, Selenium has often needed to be upgraded to accommodate newer versions of browsers.

Brett Porter