title: Selenium HtmlUnit freeze randomly loading a web page
body: <p>im having a problem with HtmlUnitDriver using Selenium.</p>
  
  <p>Im using the Selenium 2.5 version.</p>
  
  <p>The test is so simply and usualy it works correctly but sometimes the driver just stop and wait endlessly for a page to load.</p>
  
  <p>my code is something like this:</p>
  
  <p>initialization...</p>
  
  <pre><code>private WebDriver driver;
      driver = new HtmlUnitDriver(BrowserVersion.FIREFOX_3_6);((HtmlUnitDriver) driver).setJavascriptEnabled(true);
          //driver = new FirefoxDriver();
          driver.manage().timeouts().implicitlyWait(0, TimeUnit.MILLISECONDS);
          driver.manage().timeouts().setScriptTimeout(0, TimeUnit.MILLISECONDS);
  </code></pre>
  
  <p>and then a lot of blocks like this one:</p>
  
  <pre><code>new Actions(driver).moveToElement(driver.findElement(By.linkText("Someting"))).perform(); 
          driver.findElement(By.linkText("something else")).click();
          driver.findElement(By.name("something")).sendKeys("8");
          driver.findElement(By.xpath("//img[@title='something']")).click();
  </code></pre>
  
  <p>after each clic() it loads a new page.</p>
  
  <p>I usualy end the whole test correctly and i have try catched all the blocks so the web is not the problem.</p>
  
  <p>The webdriver is ignoring the timeouts(i try a lot of diferent timeouts and the problem persists) and i cant stop the driver from another threads invoquing "quit()" or "close()"</p>
  
  <p>I search everywhere but i cant found a solution.</p>
  
  <p>¿Anyone can help me?</p>
  
  <p>Thanks in advance.</p>