title: Java/SeleniumWebDriver - Click a JQuery dialog button with Selenium
body: <p>I currently trying to test a dialog with Selenium WebDriver but the "Create Employee" button doesn't  have an id nor a name. This is what the code looks like.</p>
  
  <pre><code>&lt;div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"&gt;
      &lt;div class="ui-dialog-buttonset"&gt;
  
           &lt;button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false"&gt;
                &lt;span class="ui-button-text"&gt;Create Employee&lt;/span&gt;
           &lt;/button&gt;
  
           &lt;button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false"&gt;
                &lt;span class="ui-button-text"&gt;Cancel&lt;/span&gt;
           &lt;/button&gt;
  
      &lt;/div&gt;
  
           &lt;button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false"&gt;
                &lt;span class="ui-button-text"&gt;Create Employee&lt;/span&gt;
           &lt;/button&gt;
  
           &lt;button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false"&gt;
                &lt;span class="ui-button-text"&gt;Cancel&lt;/span&gt;
           &lt;/button&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>Can anyone provide me with the java code that will click the button in the dialog box? Thanks</p>