【发布时间】:2013-11-12 21:46:12
【问题描述】:
我在 webtester 中设置代理配置时遇到问题。 之前,我使用 htmlunit 2.11 jar 使用以下代码:
HtmlUnitTestingEngineImpl h = (HtmlUnitTestingEngineImpl) wt.getTestingEngine();
ProxyConfig proxyConfig = new ProxyConfig(ip, 4128);
h.getWebClient().setProxyConfig(proxyConfig);
更新 jwebunit 库(即 htmlunit 2.13、httpclient4.3.1 等)后,WebClient 不支持 setProxyConfig 方法。 似乎在 WebClient 中设置代理的唯一方法是在构造函数中。 现在,如何为 jwebunit WebTester 设置代理配置? 谢谢
【问题讨论】:
标签: java webclient htmlunit jwebunit