0

Im trying to launch a Firefox instance with webdriver, but I want to instruct it to use certain xvfb display. I think something is wrong with my code, though

   FirefoxBinary ffox = new FirefoxBinary();
   ffox.setEnvironmentProperty("DISPLAY", "22");
   driver = new FirefoxDriver();

As you can see, at no point there is any mention to the "new firefoxdriver()" to use that ffox setting, but when I put ffox in the brackets of FirefoxDriver, my code goes red, because it can't accept such thing.

Is there something wrong with my code?

Kaloyan Roussev
  • 14,515
  • 21
  • 98
  • 180

1 Answers1

1

You need to set System property to use the FF binary. Refer here http://code.google.com/p/selenium/wiki/FirefoxDriver

Akbar
  • 1,513
  • 4
  • 20
  • 34