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 "send"
Here is HTML code for image embeded in table:
<a class="ctl00_C_S_Z_ctrlActionToolbar_Menu1_1" href="javascript: ValidateSendMessage()>
<img src="ShmControls/ShmImages/SHM_Send_Trans.png" alt="Send Message" style="border-style:none;vertical-align:middle;>"Send" /a>
Let me know, how I can locate this button on the web page?
I tried with all the below options to locate image element
IWebElement Send = driver.FindElement(By.XPath("a[@href= 'javascript: ValidateSendMessage()')]"));
IWebElement Send = driver.FindElement(By.XPath("//img[contains(src,'ShmControls/ShmImages/SHM_Send_Trans.png')]"));
IWebElement Send = driver.FindElement(By.XPath("//*@id='ctl00_C_S_Z_ctrlActionToolbar_Menu1']"));
IWebElement Send = driver.FindElement(By.LinkText("ShmControls/ShmImages/SHM_Send_Trans.png"));