Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm pretty new to selenium, and I'm following the Selenium Simplified book examples.

I'm trying to run a simple test that was created in Selenium IDE on Portable Firefox 3.6, and saved as a JUnit 3 test.

My OS is Windows 7 64 bit, and Firefox 4 is the default installation of Firefox (hence the need for portable 3.6, to use the IDE).

The selenium server is already running when the test is run.

The test itself is this:

public class MyFirstSeleniumTests extends SeleneseTestCase {
    public void setUp() throws Exception {
        setUp("", "*chrome");
    public void test_google_for_selenium_rc() throws Exception {"/");
        selenium.type("q", "selenium rc");"btnG");

The output in the server console is this:

14:04:44.950 INFO - Command request: getNewBrowserSession[*chrome,, ] on session null
14:04:44.961 INFO - creating new remote session
14:04:45.715 INFO - Got result: Failed to start new browser session: java.lang.RuntimeException: Firefox 3 could not be found in the path!
Please add the directory containing ''firefox.exe'' to your PATH environment
variable, or explicitly specify a path to Firefox 3 like this:
*firefox3c:\blah\firefox.exe on session null

I tried more variations, but all gave me errors, so let's start here, and see where that goes.

share|improve this question

It can't find you firefox path, you will need to modify your path environmental variable to include the firefox.exe location.

To modify your env path do the following:

  1. Click Start Menu -> right click on Computer and Select Properties
  2. Select Advanced System Settings
  3. Click Environmental Variables Under System Variables scroll down to Path, Select it and Click Edit Add the path to your forefox.exe to the end with a semi colon in front of it (e.g. ;C:\Firefox)
  4. Click OK -> OK -> OK and try again.
share|improve this answer
Added. I can attest to that since launching firefox from any directory works. I still get the same result, though. – Roni Yaniv May 29 '11 at 13:26
Exactly the same error message? Very strange, FF4 is not offically supported fully until RC1 so that may be causing you issues. Does it work using IE? – Ardesco May 31 '11 at 9:06

I have no experience with Junit but did you notice error message -

Please add the directory containing ''firefox.exe'' to your PATH environment
variable, or explicitly specify a path to Firefox 3 like this:
*firefox3c:\blah\firefox.exe on session null

also is it possible for you to downgrade browser to 3.0/3.6 and see if that works?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.