htmlunit cookie/参考问题
测试 java HtmlUnit 库。试图弄清楚是否有办法设置/删除 webclient 对象使用的 cookie 文件(cookiejar)..
我搜索了多个文档,以及 HtmlUnit API 但没有运气,所以我假设我是缺少一些东西。
另外,有没有办法在我的测试过程中查看客户端/服务器之间的标头(请求/响应/引用)...
谢谢
汤姆
Testing out the java HtmlUnit lib. Trying to figure out if there's a way to set/delete the cookie file (cookiejar) used by the webclient object..
I've searched multiple docs, as well as the HtmlUnit API with no luck, so I'm assuming I'm missing something.
Also, is there a way to see the headers (request/respnse/referer) being xfered between the client/server during my testing...
thanks
tom
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 webClient.getCookieManager(),并且可以将 HttpWebConnection 子类化为:
You can use
webClient.getCookieManager()
, and you can subclass HttpWebConnection as: