If the element is present in the html but, for the element to come into view it needs to be scrolled up.

When clicking on this element Selenium webdriver does not throws any error but it does not click and moves to the next step without clicking.

Any way to check if it is not displayed, because ele.isDisplayed() returns true.

Edit : It is the problem with Internet Explorer only it seems.

  • By design, webdriver can do only what user can do in the browser. User cannot click element which s not visible, so what would be use case for automated activity which user cannot do? How it would help testing? Oct 2, 2015 at 15:39
  • should it not show it as not displayed then? How can both hold true? i.e. it shows it as displayed and it can't click. I am going into the argument of how it would help testing. I wanted to know if there is any way i could identify that it is not displayed on the page, so that i can handle it appropriately. Oct 2, 2015 at 15:54
  • if the objective is to check if element is displayed, you can use JSExecutor or the element.size!=0 condition. Oct 2, 2015 at 16:44
  • display vs visibility in CSS iow, displayed element might be rendered (taking space on the page) but invisible (hidden) Oct 2, 2015 at 16:51

1 Answer 1


See display vs visibility in CSS

Displayed element might be rendered (taking space on the page) but invisible (hidden)

  • this is a great read. +1 Oct 2, 2015 at 18:04
  • does not answer my question. The element on my page does not have any different property..! Oct 6, 2015 at 13:28
  • I really do not understand your comment. Link above explains the situation when element is displayed, but not visible, as you asked in your question, and why not allowing it to be clickable (because user could not click on it) is correct handling of the conditions. Is your element visible? What other different properties are you talking about? Oct 6, 2015 at 14:01

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.