title: How to click image in a table in selenium
body: <p>On the Web page, I have 3 buttons with a link image in a table.I want to click on Image. But I could not locate the image with button as &quot;send&quot;</p>
  <p>Here is HTML code for image embeded in table:</p>
  <pre><code>&lt;a class=&quot;ctl00_C_S_Z_ctrlActionToolbar_Menu1_1&quot; href=&quot;javascript: ValidateSendMessage()&gt;
  &lt;img src=&quot;ShmControls/ShmImages/SHM_Send_Trans.png&quot; alt=&quot;Send Message&quot; style=&quot;border-style:none;vertical-align:middle;&gt;&quot;Send&quot; /a&gt;
  </code></pre>
  <p>Let me know, how I can locate this button on the web page?</p>
  <p>I tried with all the below options to locate image element</p>
  <pre><code>IWebElement Send = driver.FindElement(By.XPath(&quot;a[@href= 'javascript: ValidateSendMessage()')]&quot;));
  IWebElement Send = driver.FindElement(By.XPath(&quot;//img[contains(src,'ShmControls/ShmImages/SHM_Send_Trans.png')]&quot;));
  IWebElement Send = driver.FindElement(By.XPath(&quot;//*@id='ctl00_C_S_Z_ctrlActionToolbar_Menu1']&quot;));        
  IWebElement Send = driver.FindElement(By.LinkText(&quot;ShmControls/ShmImages/SHM_Send_Trans.png&quot;));  
  </code></pre>