In my application, i have to perform click operation on an Eye icon to view the documents but i am unable to generate proper xpath to locate that icon.
Below is the image of HTML code.I am unable to copy paste the code hence attaching the image.
Below is the code tried but i am no such element error.
IWebElement salaryeyeicon = driver.FindElement(By.XPath("//*[@id='DocSelected-1']/span/span/i"));
salaryeyeicon.Click();
(OR)
IWebElement salaryeyeicon = driver.FindElement(By.XPath("//div[@id='DocSelected-1']//span[@class='col-xs-10 dl-no-padding']//i[@class='document-icon-eye dl-padding-right-10 pull-right']"));
salaryeyeicon.Click();
Kindly suggest the right way to locate the element.

Aucun commentaire:
Enregistrer un commentaire