Migrating from HtmlUnit 2.x.x to HtmlUnit 3.x.x

HtmlUnit 3 is essentially the conversion to the new domain htmlunit.org. For this purpose, the maven group id's of HtmlUnit as well as the subprojects core-js, neko, cssparser and xpath were adapted. Furthermore the package names were unified.

1. adjust maven group id to org.htmlunit


2. Change all package names in your source code - replace 'net.sourceforge.htmlunit'' by 'org.htmlunit'

import org.htmlunit.BrowserVersion;
import org.htmlunit.WebClient;
import org.htmlunit.html.HtmlInput;
import org.htmlunit.html.HtmlPage;

3. Update input control value access

Replace all usages of org.htmlunit.html.HtmlInput.getValueAttribute() by org.htmlunit.html.HtmlInput.getValue().

Replace all usages of org.htmlunit.html.HtmlInput.setValueAttribute(String) by org.htmlunit.html.HtmlInput.setValue(String).