2

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.

Johnson
  • 21
  • 1

1 Answers1

0

This should do it

webClient.closeAllWindows();
Navi
  • 8,580
  • 4
  • 34
  • 32
  • What I am trying to do is while htmlunit is downloading a webpage, the thread within which htmlunit was called is not terminating because htmlunit has not hang up / finish downloading the page, so I want a situation where htmlunit will stop no matter if it has finished the task or not when the thread was told to terminate. – Johnson Feb 05 '11 at 13:31
  • i second the motion. this doesnt work. the thread that is getting the page keeps running. – Or Gal Dec 24 '12 at 12:44