Why doesn't HtmlUnitDriver execute JavaScript?

前端 未结 5 1859
滥情空心
滥情空心 2020-12-20 12:00

I got the following problem: I am running a JUnit testCase with Selenium 2.9 using HtmlUnitDriver with Browserversion Firefox_3_6. JavaScript is enabled. Now when it should

5条回答
  •  悲哀的现实
    2020-12-20 12:37

    Well, There is an easy way to enable browser capability and javascript, you can do the following:

    Webdriver driver = new HtmlUnitDriver(BrowserVersion.Chrome,true);
    

    True specifies that javascript should be enabled. @Glenn Nelson,

提交回复
热议问题