Terminat or Stop HtmlUnit

守給你的承諾、 提交于 2019-12-13 15:25:52

问题


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.

Thank you.


回答1:


This should do it

webClient.closeAllWindows();


来源:https://stackoverflow.com/questions/4906806/terminat-or-stop-htmlunit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!