title: Workaround for click() not working in HtmlUnitDriver in Fitnesse?
body: <p>I have a jUnit test running a Fitnesse test that tests some web pages. When in development mode, I use the FirefoxDriver and all tests run great, with web pages popping up as expected.</p>
  
  <p>When I try to run the test in an automated mode, i.e. using Maven, the tests fail miserably. Do any of you have any suggestions of what might be wrong or a workaround?</p>
  
  <p>The relevant code:<br>
  - The web page:  </p>
  
  <pre><code>      &lt;form method="get" action="/someAction.do" name="my_form"&gt;  
        &lt;input id="fetch_new_submit" class="ui-button ui-widget ui-state-default ui-corner-all" type="submit" onclick="showWaitMsg()" value="Fetch new orders" role="button"&gt;  
        &lt;/form&gt;
  </code></pre>
  
  <ul>
  <li><p>The fixturecode:<br>
      class SomeFixture...</p>
  
  <pre><code>public boolean pressSubmitButton(String buttonText) {
  try {
     List&lt;WebElement&gt; buttons = getWebDriver().findElements(By.tagName("input"));
     for (WebElement button : buttons) {
         if (button.getAttribute("value").equals(buttonText)) {
             System.out.println("found button '" + button.getAttribute("value") + "'.");
             button.click(); //HERE
             return true;
         }
     }
  } catch (Exception e) {
     LOG.debug("Some error occured, e);
     return false;
  }
  LOG.debug("Did not find the button");
  return false;
  }
  </code></pre></li>
  </ul>
  
  <p>Note:<br>
  - getWebDriver() returning FirefoxDriver works fine.<br>
  - getWebDriver returning new HtmlUnitDriver(true) i.e. with javascript enabled, ignores the button.click() at HERE. Button.submit() is also ignored here and button.sendKeys("\n") throws an element 'not enabled'-error.<br>
  - we use version 2.0rc2</p>
  
  <p>Our automated tests can't use FirefoxDriver. Are there any known workarounds for this issue?</p>