title: Selenium Click Image Link based on Alt (including quote)
body: <p>I have a tricky one!</p>
  
  <p>I am trying to test an image button click in Selenium. This is the HTML code:</p>
  
  <pre><code>&lt;a href="/targetPage.do?status=onOrder&amp;"&gt;&lt;img src="/img/buttons/showOnOrder.gif" alt="Show 'On Order'"/&gt;&lt;/a&gt;
  </code></pre>
  
  <p>I completely agree that having the single quote in the alt text is not ideal/good, but for the purposes of this test, I can't currently change the code.</p>
  
  <p>I have tried the following</p>
  
  <pre><code>selenium.click("//img[@alt=\"Show 'On Order'\"]");
  selenium.click("xpath=//img[@alt='Show ''On Order''']");
  </code></pre>
  
  <p>But no joy. Please, please, please make my day and suggest the syntax I can use that works.</p>