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/termi开发者_运维问答nate Htmlunit when it is stuck/hangs while accessing a webpage.
Thank you.
This should do it
webClient.closeAllWindows();
精彩评论