When you try to use `HtmlUnit`,
you might encounter the following exception:
java.lang.IllegalArgumentException: Cannot locate declared field class org.apache.http.impl.client.HttpClientBuilder.sslcontext
You're using httpcomponents 4.5.
If you don't need the version,
downgrade it to 4.4.1 as follows:
testCompile("org.apache.httpcomponents:httpclient:4.4.1")
testCompile("org.apache.httpcomponents:httpmime:4.4.1")
References:
http://htmlunit.10904.n7.nabble.com/HtmlUnit-htmlunit-bugs-1692-Update-to-HttpComponents-4-5-td36318.html
This comment has been removed by the author.
ReplyDeleteI have this problem, I downgraded to 4.4.1 with maven, but it does not work. What did you mean by testCompile("org.apache.httpcomponents:httpclient:4.4.1") ?
ReplyDeleteThanks, worked for me
ReplyDeleteThanks a lot! worked for me!
ReplyDelete