java 7 - How to include HtmlUnit in a Kotlin project -
i'm trying use htmlunit in kotlin project following error when compile:
error:kotlin: supertypes of following classes cannot resolved. please make sure have required dependencies in classpath: class com.gargoylesoftware.htmlunit.html.domelement, unresolved supertypes: elementtraversal
this because elementtraversal java 7 feature. how can solve this?
the org.w3c.dom.elementtraversal
part of xml-apis
dependency of xerces:xercesimpl
. xerces:xercesimpl
in turn dependency of htmlunit
.
make sure add transitive dependencies of htmlunit
project.
with gradle needed is:
compile 'net.sourceforge.htmlunit:htmlunit:2.22'