title: How can I configure selenium webdriver to use custom firefox setup for tests?
body: <p>I am using Ubuntu 11.04 and selenium 2.9.0 Here is how it is configured in my root pom:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
      &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
      &lt;version&gt;2.9.0&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>When attemting to run a test, I get an exception:</p>
  
  <pre><code>org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
  *** LOG addons.xpi: startup
  *** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID: &gt; /tmp/anonymous3804893394247066972webdriver-profile/extensions/webdriver-staging
  *** LOG addons.xpi: checkForChanges
  *** LOG addons.xpi: No changes found
  
      at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:95)
      ....
  </code></pre>
  
  <p>As far as I have googled it, the issue is that the firefox driver that selenium uses is incompatible with the version of the browser. Having in mind the frequent updates firefox releases, it will be difficult to maintain my local test environment. </p>
  
  <p>Therefore, I have decided to install a static firefox with the latest known to me compatible version and to use selenium with it, while preserving my default firefox (I must not remove it). </p>
  
  <p>So, I am not sure how to setup my selenium configuration in order to make it work with the static firefox. Probably I must configure my app to receive the path to the firefox binary for the driver to use? I'd like to know if anything else is also needed.</p>
  
  <p>** Edit</p>
  
  <p>I am using configuration properties to initialize the proper webdriver:</p>
  
  <pre><code>public abstract class SeleniumTestBase {
  
      ...
  
      public final void setUp() throws Exception {
          String driverClass = getConfigurationProperty("selenium.webDriverClass");
          driver = (WebDriver) Class.forName(driverClass).newInstance();
          ...
          doSetUp();
      }
  
      public void doSetUp() {
      }
  
      ...
  }
  </code></pre>
  
  <p>The <code>"selenium.webDriverClass"</code> property is manageable by the pom.xml therefore different profiles can have different value. Currently it is the FQN of the driver class to be instantiated.</p>