1

Internet Explorer 11 does not detect that there is an element over the element that I want to click.

The use case is a page with a fixed div, that is a nav bar, and a button that is scrolled under the nav bar. Then the IE cannot detect that there is a div over the button and click on the nav bar.

On Chrome I get an error that mentions:

Element is not clickable at point (411, 675). Other element would receive the click

But on Internet explorer, there is no such error.

Here is an example https://jsfiddle.net/qv2m5t1e/ where there is a nav bar and a Button. Using Internet Explorer I cannot click on "button 1" because he scrolls it under the navbar, and hence clicks on the nav bar instead of the button.

If you look at the example above in Internet Explorer, you cannot click button 1 because the other element will revceive the click.

Is there a work around?

ouflak
  • 2,458
  • 10
  • 44
  • 49
  • Why not scroll up so the navbar is not over the button you want to click? – Ryan Wilson Feb 07 '18 at 17:58
  • set your z-index to controll what you are wanting to achieve ? – happymacarts Feb 07 '18 at 18:00
  • @RyanWilson but how can i know before hand if the button is bellow the navbar. i have no way to check that with selenium. – Andre Altran Feb 08 '18 at 08:11
  • @happymacarts the navbar does not use z index. i also do not want to change the page, just to execute an action. i much rather scroll up the page to make the button visible again. – Andre Altran Feb 08 '18 at 08:13
  • @AndreAltran If there is no property to check as in IsClickable() or something to that affect, wrap your click in a try catch and have a catch clause for the Element is not clickable exception, then scroll try again, until you are able to click it. Or you can check if it is visible and enabled, but as this post points out even then sometimes it is not clickable due to it being overlapped with something, like in your case, in which case it suggests using ExecScript to do it with javascript code, (https://stackoverflow.com/questions/38327049/check-if-element-is-clickable-in-selenium-java) – Ryan Wilson Feb 08 '18 at 13:14

0 Answers0