I have selenium-java 3.0.1 in my Maven project. I have read that this version does not come packaged with HTMLUnitDriver. So, I have separately included selenium-htmlunit-driver 2.52.0 in my pom (the latest version available). However, when I do this, I get the following exception on test run:
org.openqa.selenium.WebDriverException: java.lang.IllegalArgumentException: Cannot locate declared field class org.apache.http.impl.client.HttpClientBuilder.sslcontext
According to this link, including the selenium-java and selenium-htmlunit-driver dependencies should be sufficient. In some scenarios, the standalone server may need to be included as well, which is not the case for my project. I tried it anyway, and that didn't work either.
selenium-htmlunit-driver 2.52.0 is internally dependent on org.apache.httpcomponents 4.5.1.
selenium-java 2.47.0 uses htmlunit-driver 2.47.0 which uses org.apache.httpcomponents 4.4.1. When I use these versions, everything works correctly.
So my question is, can HTMLUnitDriver not be used with Selenium 3.0.x at all? Or is my understanding completely wrong here?