1

I was trying to click on a element by finding it using classname But i got an error saying element is not visible.

Then i debug the code and saw "Displayed = False" .

enter image description here But the element is fully visible to be. So the Question is why this happens and how to overcome this king of situation.

3
  • make it displayed using JavascriptExecutor. But its really weird that you can see it but selenium cant click it.
    – George
    Feb 17, 2017 at 16:46
  • @ChathuD: Have you sort it out? I'm facing the same issue with Chrome Web Driver.
    – el.severo
    Jul 14, 2018 at 23:17
  • 1
    @el.severo i skip this test case. :( , I could not find a better solution .
    – ChathuD
    Jul 16, 2018 at 3:51

2 Answers 2

1

If element is not displayed, user would not be able to interact with it, so your test (which should emulate what user would do) shod not be able to do anything with it either.

IOW it is not a bug, it is a feature.

2
  • Thats the problem ,even its property set to display =falls ,its available on the webpage,use can click on ot.
    – ChathuD
    Feb 18, 2017 at 15:55
  • If what you say is true (which I doubt), you found a bug in the browser rendering engine. Most likely there is some other element, which is enabled, and you are looking in a wrong place. Feb 18, 2017 at 18:02
0

Try using javascript click event. I am tagging the stackoverflow answer here. Let me know if this works for you https://stackoverflow.com/questions/11947832/how-to-click-an-element-in-selenium-webdriver-using-javascript

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.