title: HtmlUnit get submit button from form by it's value?
body: <pre><code>&lt;input type="submit" class="submit-button" style="white-space:normal" value="hello world!"&gt;
  </code></pre>
  
  <p>This is how the HTML submit button works, in HTMLUNIT I already got the form, using the list:</p>
  
  <pre><code>HtmlForm form = this.page.getForms().get(0);
  </code></pre>
  
  <p>But now the site im trying to load doesn't have id or name on the submit button, just a class &amp; a value.</p>
  
  <p>I tried doing this:</p>
  
  <pre><code>HtmlButton button = (HtmlButton) page.getByXPath("/html/body//form//input[@type='submit' and @value='Hello world!']");
  </code></pre>
  
  <p>But when it loads, I get this error:</p>
  
  <pre><code>Exception in thread "Thread-1" java.lang.ClassCastException: java.util.ArrayList cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlButton
      at Web.getButton(Web.java:78)
      at java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>How can I get button without id or value?</p>