I was using the latest version I found on
http://mvnrepository.com.
Now I´m using this configuration on Maven:
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-htmlunit-driver</artifactId>
<version>2.0a5</version>
</dependency>
setAutoProxy didn´t work for me, but this configuration worked:
private static WebDriver createHtmlUnitWebDriver() {
HtmlUnitDriver htmlUnitDriver = new HtmlUnitDriver() {
@Override
protected WebClient modifyWebClient(WebClient client) {
DefaultCredentialsProvider credentialsProvider = new
DefaultCredentialsProvider();
credentialsProvider.addNTLMProxyCredentials(PROXY_USERNAME,
PROXY_PASSWORD, PROXY_HOST, PROXY_PORT, CLIENT_HOST, CLIENT_DOMAIN);
client.setCredentialsProvider(credentialsProvider);
return client;
}
};
htmlUnitDriver.setProxy(PROXY_HOST, PROXY_PORT);
return htmlUnitDriver;
}
Thanks everyone for the help.
--
Guilherme Garnier
http://blog.guilhermegarnier.com
On Aug 17, 4:39 pm, Daniel Wagner-Hall <
dawag...@gmail.com> wrote:
> That is an incredibly old release. WebDriver has become Selenium 2 -
> links to the artifacts can be found onhttp://
seleniumhq.wordpress.com/2010/07/30/how-to-use-selenium-2-with...