title: I am trying to find a button in selenium webDriver. I am having issues finding an element text that includes spacesusing xpath
body: <p>Here is the HTML:</p>
  
  <pre><code>&lt;a class="editorButton" href="javascript:validateAndSubmit(document.form,'/Dispatcher?page=ExpressReqEditor&amp;element=Submit&amp;sig=R2pneG9IbTVSaFh0MEo4ZWFEQkxlUWZpQkhjPTtORFpsWVRNeE56UXRaamt3TkMwMFpqaGpMV0kxWlRZdE5ESXpOREJpWVRSbU5EQmk7cGFnZTtlbGVtZW50');"&gt;  submit  &lt;/a&gt;
  </code></pre>
  
  <p>I have tried every thing i can think of with no luck. The only way i can find it is by its xpath:</p>
  
  <pre><code>html/body/form/table/tbody/tr/td/table/tbody/tr[52]/td[2]/a[3] &gt;
  </code></pre>
  
  <p>Here is what I have tried:</p>
  
  <pre><code>driver.findElement(By.xpath("//a[contains(text(), ' Submit ')]")).click(); 
  driver.findElement(By.xpath("//a[contains(.,' Submit ')]")).click(); 
  driver.findElement(By.xpath("//a[contains(normalize-space(.),' Submit ')]")).click(); 
  driver.findElement(By.xpath("//a[contains(normalize-space(.),'Submit')]")).click(); 
  driver.findElement(By.xpath("//a[contains(text(), '&amp;nbsp&amp;nbspsubmit&amp;nbsp&amp;nbsp')]")).click(); 
  driver.findElement(By.xpath("//a[contains(text(), ' submit ')]")).click();
  </code></pre>
  
  <p>Any help would be great</p>