Artjom Kurapov
Artjom Kurapov

Reputation: 6155

Selenium RC in Ubuntu doesn't start Firefox 2 (and cannot close it)

I'm using selenium grid and I have tried both server versions 1.0.3 and now replaced with 2.2.0. It works fine with google chrome and opera, but with firefox 2 or 3.6.9 it fails.

So with bad case scenario grid has configuration with

name:    "Ubuntu - Firefox 2"
browser: "*firefox /home/artjom/opt/firefox-2.0/firefox-bin"

And running testCase stops at loading profiles

     [java] 15:41:12.103 INFO - Command request: getNewBrowserSession[*firefox /home/artjom/opt/firefox-2.0/firefox-bin, http://kurapov.name/] on session null
     [java] 15:41:12.104 INFO - creating new remote session
     [java] 15:41:12.104 INFO - Allocated session 1bae135617ab4761abd6be894e49bdae for http://kurapov.name/, launching...
     [java] 15:41:12.215 INFO - Preparing Firefox profile...
     [java] 15:41:20.345 INFO - Checking connection to hub...
     [java] 15:41:20.345 INFO - Ping Hub at http://192.168.20.106:4444/heartbeat?host=192.168.20.98&port=5555
     [java] 15:41:32.540 ERROR - Failed to start new browser session, shutdown browser and clear all session data
     [java] java.lang.RuntimeException: Timed out waiting for profile to be created!
     [java]     at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:360)

And if i try adding some extra params in there like -P default or -no-remote, then its not parsed correctly. So instead i can write a shell script that does same thing, although in config I'l have to use *custom instead of *firefox and i think it affects somehow how browser is closed..

name:    "Ubuntu - Firefox 2"
browser: "*custom /home/artjom/firefox2.sh"

So now all of the sudden it works fine, except that browser is not closed at the end of the session, causing problems with recurrent execution. And close() method at the end of the test case (or teardown) that many suggest only closes page that is being tested, while RC execution frame remains. Any suggestions?

Upvotes: 1

Views: 433

Answers (1)

Artjom Kurapov
Artjom Kurapov

Reputation: 6155

Partially solved by using *firefoxproxy that does close browser and by using default profile

Upvotes: 1

Related Questions