Skip to main content

Jun 19, 2014 - 1 minute read - Maven Selenium Simplified Blog

Upgrading the HTMLUnit Version for WebDriver with Maven Dependencies

Since HTMLUnit impressed me so much in my last run through of tests I wanted to see how the current version would perform.

I noticed that WebDriver 2.42.2 uses version 2.14 of HTMLUnit,  but the current version of HTMLUnit is 2.15. I wanted to try 2.15 and see if it made a difference.

I import the full selenium-server dependency since it makes life easy for me.


This brings in HTMLUnit 2.14.

To bring in 2.15, I have to add a dependency on HTMLUnit itself in my pom.xml. And, provided HTMLUnit versions are backwards compatible, I should be good to go.

In the pom.xml before I import selenium-server, I import HTMLUnit


And when I run the tests against this version of HTMLUnit, I discover that a few more tests have failed.

Oh well, I guess the guys at SeleniumHQ know what they are doing, and the picked the best version.

But the point is - you can override the dependencies if you have a specific use case that needs it, or a clash in those dependencies.





You will need a Github account to comment. Or you can contact me with your comment.

I reserve the right to delete spam comments e.g. if your comment adds no value and its purpose is simply to create a backlink to another site offering training, or courses, etc.