0

I am trying to click over a link using xpath locator , but the click is not happening. Also I dont get any error or exception. I have checked with selenium IDE that the path I am providing is correct to recognize the link.

Here is my code is

driver.findElement(By.xpath("//div[@class='bpm-social-task-row-data-header']/span/a")).click();

I have also tried this

WebElement steplink =  driver.findElement(By.xpath("//div[@class='bpm-social-task-row-data-header']/span/a"));
System.out.println("steplink properties " + steplink.getText());
steplink.hover();
steplink.click();

This also giving same result.

STT LCU
  • 4,348
  • 4
  • 29
  • 47
Gayatri
  • 1
  • 1
  • I don't know any `hover()` method from the [`WebElement`](http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/WebElement.html) interface. Have you tried in a different browser? Anyway, try to [highlight](http://stackoverflow.com/questions/10660291/highlight-elements-in-webdriver-during-runtime/10660734#10660734) the element before clicking it so you can see whether you really got the right element. – Petr Janeček Oct 08 '13 at 12:47
  • 1
    Well what does `getText` print out? What errors do you get? Change it to a `.findElements` and ensure the size of the collection returned is 1, to ensure you are not getting multiple elements from that selector, combined with Slanec's suggestion above will to ensure that you are getting the **exact** element you want. – Arran Oct 08 '13 at 13:22
  • Providing your input document would help us help you. – kjhughes Oct 08 '13 at 13:33

0 Answers0