Menu

#43 Set Proxy in WebTester

Release_1.3
open
nobody
proxy (1)
5
2013-11-12
2013-11-12
PeppeM
No

I have a problem in setting a proxy config in webtester.
Before, with htmlunit 2.11 jar I was using the following code:

HtmlUnitTestingEngineImpl h = (HtmlUnitTestingEngineImpl) wt.getTestingEngine();
ProxyConfig proxyConfig = new ProxyConfig(ip, 4128);
h.getWebClient().setProxyConfig(proxyConfig);

After updating jwebunit libraries (i.e. htmlunit 2.13, httpclient4.3.1 etc.) the setProxyConfig method isn't supported in WebClient.
It seems the only way to set proxy in WebClient is in the constructor.

Now, How can I set a proxy configuration for a jwebunit WebTester?
Thanks

Discussion


Log in to post a comment.