From: Javier G <jav...@ya...> - 2005-07-15 09:27:29
|
well, I got it. now it works; here is the code in case other users has the same problem (i didn´t found anything similar in the archive). final WebClient webClient = new WebClient( BrowserVersion.MOZILLA_1_0, "my.corporative.proxy", 8080); final DefaultCredentialsProvider scp = new DefaultCredentialsProvider(); scp.addProxyCredentials("user", "password","my.corporative.proxy",8080); webClient.setCredentialsProvider(scp); final URL url = new URL("http://htmlunit.sourceforge.net"); final HtmlPage page = (HtmlPage)webClient.getPage(url); Assert.assertEquals( "htmlunit - Welcome to HtmlUnit", page.getTitleText() ); --------------------------------- Correo Yahoo! Comprueba qué es nuevo, aquí http://correo.yahoo.es |