element click intercepted - but by another window (??)

43 views
Skip to first unread message

Cosmin Eftimie

unread,
Dec 7, 2022, 10:51:43 PM12/7/22
to Selenium Users
Hi all, I am having tests inconsistently failing because of the following error: "org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element is not clickable at point (951, 1477)".
I say inconsistently because this only happens if I go overboard with the number of parallel threads (sometimes 4+ is enough to get some errors, sometimes I need 10+ depending on what else I have running at the moment).

As you can see in the error, I am not receiving the second part which you'd usually get if the webelement in question would be obstructed by another, which makes me think that somehow the element can't be clicked because it's hidden by another window... ?

The weird part is that my explicit wait (set to 60 seconds) seems to be ignored, which makes me to believe that the wait condition (elementToBeClickable AND visibilityOf) is met, yet the click still doesn't work.

Anyone feels like they could help?
Thanks in advance!

Adrian

unread,
Dec 8, 2022, 3:39:14 PM12/8/22
to Selenium Users
Hi,
When I go overboard and run lots of browsers, I too have experience similar issues.
The first thing I do is to look at the error screenshot to see what it looks like.
Most of the time the error screenshot does not show anything odd, sometimes it shows something useful.
When my error screenshot does not show anything I have to guess about what is going on.  The page will be slower to load and data will take longer to display.
In this case a throbber that I usually don't see, might be displayed and this is what gives me the element not clickable error.  However by the time the error picture is taken the throbber is no longer displayed.
So I add a wait for the throbber and this usually solves my problem.

The problem that you might encounter with your wait condition is that the element might be visible and clickable - passing the wait condition and then a throbber is displayed causing the error.
It can be tricky to fix this.

Good luck,
Adrian.
Reply all
Reply to author
Forward
0 new messages