终止或停止HtmlUnit [英] Terminat or Stop HtmlUnit

查看:105
本文介绍了终止或停止HtmlUnit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用htmlunit测试某些网站,我注意到Htmlunit卡在了某些网页上.这个问题使调用htmlunit的线程不终止.请问您是否有任何阻止Htmlunit的方法,就像在真正的Web浏览器中一样,只需单击浏览器的停止"按钮即可.我想在访问网页时卡住/挂起时停止/终止Htmlunit.

I use htmlunit to test some website and I noticed that Htmlunit got stuck on some webpages. This problem is making the thread within which htmlunit was call from not terminating. Please do you know of any way to stop Htmlunit like in a real web browser where you will just click the browsers stop button. I want to stop/terminate Htmlunit when it is stuck/hangs while accessing a webpage.

谢谢.

推荐答案

这应该做到

webClient.closeAllWindows();

这篇关于终止或停止HtmlUnit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆