2

I am using HtmlUnit driver in my selenium tests. As mentioned in the documentation,

HtmlUnitDriver driver = new HtmlUnitDriver(true);

This will cause the HtmlUnit Driver to emulate Firefox 3.6’s JavaScript handling by default."

But, I want to make sure my app works in Firefox-9. How to achieve that?

Virtual
  • 2,111
  • 5
  • 17
  • 27

1 Answers1

0

Depends what you really want to achieve. You can always use

 WebDriver driver = new FirefoxDriver();

which will open new instance of Firefox. But I am not quite sure if its solution for you

Pavel Janicek
  • 14,128
  • 14
  • 53
  • 77
  • This will invoke the Firefox. This FirefoxDriver can emulate upto version 8. But I want to run the tests headless. So only I chose HtmlUnitDriver. – Virtual Feb 17 '12 at 05:10
  • I know. I did read the HTMLUnitDriver javadoc and it seems that they can emulate only IE and FF, up to version 3.6 highest... – Pavel Janicek Feb 21 '12 at 10:32