`
wen_pp
  • 浏览: 22857 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

如何使用Fiddler Debug HtmlUnit

 
阅读更多
Fiddler is an HTTP Proxy running on port 8888 on your local PC. Can configure any application which accepts a HTTP Proxy to run through Fiddler so you can debug its traffic." (hookup) Try it:

WebClient wc = new WebClient(BrowserVersion.FIREFOX_2, "127.0.0.1", 8888);
OR

Get the correct auto-configuration URL from Fiddler by clicking Tools / Fiddler Options / Connections, and clicking the 'Copy Browser Proxy Configuration URL' link."

wc.getProxyConfig().setProxyAutoConfigUrl(strUrl);
分享到:
评论
2 楼 wen_pp 2012-04-16  
jccmjl 写道
你好,我是htmlunit使用者,在使用中我遇见了一个问题 textpage 和htmlpage什么区别,在中我要做的就是根据一个请求返回一个结果...不知

道如何做!!!!朋友可以的话联系我下,我的QQ 是452276647,邮箱:jccmjl@163.com  万分感谢!!!

WebClient web = new WebClient();
web.setJavaScriptEnabled(false);
HtmlPage responsePage = web.getPage(URL);
//得到htmlPage就可以解析这个页面了,比如获取form
HtmlForm form =(HtmlForm)responsePage.getElementById("formName");
1 楼 jccmjl 2012-04-11  
你好,我是htmlunit使用者,在使用中我遇见了一个问题 textpage 和htmlpage什么区别,在中我要做的就是根据一个请求返回一个结果...不知

道如何做!!!!朋友可以的话联系我下,我的QQ 是452276647,邮箱:jccmjl@163.com  万分感谢!!!

相关推荐

Global site tag (gtag.js) - Google Analytics