I have encountered an issue for UI elements on IE browser. The link doesn’t respond to Selenium click commands. The same commands works fine on chrome browser.

I have used Actions also, but same problem it's not identifying the element.


WebElement element = driver.findElement(By.xpath("//a[contains(@href, '#cwt_services')]"));

Actions action = new Actions(driver);


WebElement subElement = driver.findElementByXPath("//*[@id=\"yui-gen4\"]/a");




Image of the code:

enter image description here

Please help me how to handle this scenarios on IE browser.

  • Use JavaScript Executor to click on the element in IE browser. Aug 9, 2018 at 10:47
  • What is the reason for moving to element and then without any interaction on it moving to subElement? Are you sure your code logic implements the expected user behavior?
    – Alexey R.
    Aug 9, 2018 at 10:49
  • In your code you're referring to yui-gen4, while your list element has id yui-gen1. I suppose the displayed HTML fragment is not complete, else it wouldn't work in Chrome.
    – Bouke
    Oct 8, 2018 at 12:21

2 Answers 2


If you add a 5 second pause (for investigation purpose ONLY - remove after investigation) does it help at all with the issue?
If so u have a timing issue and will probably want a polling (explicit) wait on the element

  • +1 with only this context, it is probably a timing issue as IE is significantly slower compared to Chrome :) May 7, 2019 at 8:40

You can find that element by using two more methods if this is not working. Try using CSS selectors or using a tag name a, because XPath doesn't work always.

Also, I assume that you have put these lines in your code:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.