46 Replies Last post: Jan 10, 2009 5:10 AM by Kai   1 2 3 4 Previous Next
Haroon Advanced 66 posts since
Apr 23, 2008
Currently Being Moderated

Jul 7, 2008 3:24 PM

Selenium RC and Firefox 3

I am trying to run a test against Firefox 3 released version using Selenium RC. The same test works fine with Firefox 2.0. The error is as below. Is there anything that I need to setup before running the tests for Firefox 3.0

 

 

21:21:02.616 INFO - Command request: getNewBrowserSession[*chrome, http://login.salesforce.com/] on session null
21:21:02.631 INFO - creating new remote session
21:21:02.631 INFO - Allocated session c9f9a463261f4125800ce5e4567cc8cd for http://login.salesforce.com/, launching...
21:21:02.725 INFO - Preparing Firefox profile...
21:21:24.317 WARN - POST /selenium-server/driver/ HTTP/1.1
java.lang.RuntimeException: Firefox refused shutdown while preparing a profile
        at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChrome
Launcher.java:290)
        at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:143)
        at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchRemoteSession(FirefoxChromeLauncher.j
ava:329)
        at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:312)
        at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:113)
        at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:78)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.j
ava:653)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:410)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.j
ava:388)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:135)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
        at org.mortbay.http.HttpServer.service(HttpServer.java:909)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
Caused by: org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher$FileLockRemainedException: Lock file still
present! C:\Users\Ayesha\AppData\Local\Temp\customProfileDirc9f9a463261f4125800ce5e4567cc8cd\parent.lock
        at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFileLockToGoAway(FirefoxChromeLaunch
er.java:247)
        at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChrome
Launcher.java:288)
        ... 18 more
21:21:24.364 INFO - Command request: open[/, ] on session null
21:21:24.364 ERROR - Exception running command
java.lang.NullPointerException: sessionId should not be null; has this session been started yet?
        at org.openqa.selenium.server.FrameGroupCommandQueueSet.getQueueSet(FrameGroupCommandQueueSet.java:199)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:535)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.j
ava:388)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:135)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
        at org.mortbay.http.HttpServer.service(HttpServer.java:909)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
21:21:24.395 INFO - Got result: ERROR Server Exception: sessionId should not be null; has this session been started yet?
on session null

Andras Hatvani Almighty 567 posts since
Oct 16, 2006
Currently Being Moderated
1. Jul 7, 2008 4:40 PM in response to: Haroon
Re: Selenium RC and Firefox 3

Hello,

 

did you try to search the forum for an answer?

 

Andras

p.s. This is an issue, which is unfortunately reported almost every day...

Krystian Beginner 3 posts since
Aug 12, 2008
Currently Being Moderated
3. Aug 13, 2008 3:16 AM in response to: Haroon
Re: Selenium RC and Firefox 3

I had exactly same error and no solution helped me. I started new post with question, when Slenium i going to be compatible with IE and Firefox3. That's pretty anoying.

Michael Latta Beginner 9 posts since
Jun 15, 2007
Currently Being Moderated
5. Aug 20, 2008 9:16 PM in response to: Haroon
Re: Selenium RC and Firefox 3

Adding FF3 to the path and using *custom firefox and manually coniguring the proxy settings does work.  Except that you only get one shot.  After it completes a test, it tries to again create a new firefox for the next test which fails because the previous instance of firefox is already running (at least on a Mac you can not do this).  This of course also renders FF3 unusable for normal browsing as the Selenium proxy server must be running to see anything.  I am still trying to determin which version of Selenium is bundled with the Selenium-1.1.14 gem for ruby.

 

Michael

 

 

Michael Latta Beginner 9 posts since
Jun 15, 2007
Currently Being Moderated
6. Aug 20, 2008 9:35 PM in response to: Michael Latta
Re: Selenium RC and Firefox 3

Using 1.0 beta 1 does not appear to make a difference (it might be what was in the gem).  Trying the nightles next.

 

Michael

Michael Latta Beginner 9 posts since
Jun 15, 2007
Currently Being Moderated
7. Aug 20, 2008 9:54 PM in response to: Michael Latta
Re: Selenium RC and Firefox 3

Using tonight's nightlies resolved the problem partly.  I can run multiple tests in sequence and they each open firefox and run the test without intervention.  But, each test gets its own copy of firefox which means after 10 tests I have 10 sets of open windows and 10 firefox applications running.  Each application needs to be exited individually as well.  Making progress I guess, but not quite there yet.

 

Michael

 

 

Jason Huggins Beginner 249 posts since
Dec 18, 2005
Currently Being Moderated
8. Aug 20, 2008 11:40 PM in response to: Michael Latta
Re: Selenium RC and Firefox 3

I had a heck of a time figuring out the correct text to add to my path so that Selenium RC can even find the correct Firefox 3 binary.

 

At least for Ubuntu + Firefox 3, I can say with confidence:

Add this to your "~/.profile":

   PATH="/usr/lib/firefox-3.0.1/:$PATH"

 

Note that the the firefox bit comes first... Don't do the following, because it will totally fail:

  PATH="$PATH:/usr/lib/firefox-3.0.1/"

 

And this, too, will fail (because PATH should be directories, not files):

PATH="/usr/lib/firefox-3.0.1/firefox:$PATH"

 

I can't tell you how frustrating it was trying to debug this issue.

 

Thanks to Dan Fabulich for finally showing me the light... and the "path"!

 

Also, on a side note... people should really use "*chrome" as their default replacement for "*firefox" mode. "*chrome" has no problems with cross-site scripting issues and just feels more stable.

 

-Jason

Michael C Ford Beginner 25 posts since
Jun 12, 2008
Currently Being Moderated
9. Aug 21, 2008 5:09 PM in response to: Jason Huggins
Re: Selenium RC and Firefox 3

I am trying this but I have not success.

 

I modified 

 

self.selenium = selenium("localhost", 4444, "*firefox", "http://192.168.100.12/")

to 

self.selenium = selenium("localhost", 4444, "*chrome C:\\Program Files\\Mozilla Firefox\\firefox.exe", "http://192.168.100.12/")

 

still receive the same result, this works with 

self.selenium = selenium("localhost", 4444, "*iexplorer", "http://192.168.100.12/")

 

this is in my windows environment

unix it seems to work ok.

 

I really need a method that the same scripts will run on linux or windows without modifications. 

Michael Latta Beginner 9 posts since
Jun 15, 2007
Currently Being Moderated
10. Aug 21, 2008 5:33 PM in response to: Michael C Ford
Re: Selenium RC and Firefox 3

I am not on Windows so I am not sure about that.  I had to use the nightly build from last night, the beta 1 build does not appear to work with FF3.

 

Michael

Michael Latta Beginner 9 posts since
Jun 15, 2007
Currently Being Moderated
11. Aug 26, 2008 2:50 AM in response to: Jason Huggins
Re: Selenium RC and Firefox 3

I thought I saw something that said that *chrome was deprecated and 

not being supported.

 

Michael

Frederik De Milde Beginner 3 posts since
Aug 26, 2008
Currently Being Moderated
12. Aug 26, 2008 10:22 AM in response to: Haroon
Re: Selenium RC and Firefox 3

Hi,

On windows I succeeded to run  Selenium RC and Firefox 3 using the following steps

  1. run firefox in profilemanager mode ("path\to\firefox.exe" -profilemanager)
  2. create new profile (e.g. selenese) with a specific path (e.g.a directory in your workspace)
  3. open this new profile from within the profile manager and change the proxy settings within firefox (localhost:4444 or change accordingly in case your selenium RC server runs on a different port)
  4. use the following browser string within Selenium RC:  *custom path\to\firefox.exe -no-remote -profile path\to\profile\selenese

Hope this helps

 

regards

Frederik

French Official Beginner 1 posts since
Aug 26, 2008
Currently Being Moderated
13. Aug 26, 2008 4:42 PM in response to: Frederik De Milde
Re: Selenium RC and Firefox 3

This helps!

Thank you.
vela Advanced 86 posts since
Jul 15, 2008
Currently Being Moderated
14. Sep 2, 2008 2:28 AM in response to: French Official
Re: Selenium RC and Firefox 3

hi,

im using above method ,but i could run.

and i want know about 3 and 4th step.

i have created profile ,but where i can chage

proxy ..let me explain brifely  .

any body help me

thanks

velavan

More Like This

  • Retrieving data ...