Selenium: Element is not clickable at point (x,y). Other element would receive the click...

Created on 10 May 2016  路  7Comments  路  Source: SeleniumHQ/selenium

OS: Windows 7 Pro
Selenium Version: 2.53.0
Browser: Firefox 46.0.1

Expected Behavior -

Should click the Checkbox

Actual Behavior -

Getting an error message :
org.openqa.selenium.WebDriverException: Element is not clickable at point (x, y). Other element would receive the click:

Steps to reproduce -

I have an object that is a checkbox invoking pop up.

CheckBox HTML:

image

Pop-Up HTML:

D-firefox

Most helpful comment

"Element is not clickable at point (x, y)" is a legit case, Selenium throws this exception when you attempt to cllick an element covered by some other element. You should avoid clicking overlapped elements.

All 7 comments

We used to run into this all the time at work. We realized that, when leaving the pop-up (or any time there was a post on change to the webpage), there was a class attribute set on the DOM ("x-masked") if I remember right. We had to implement a wait that would wait until that attribute was no longer on the DOM before we continued test execution. I would check the DOM and watch for changes as you interact with the page. For us, the class attribute appeared at the bottom of the DOM as we clicked around. The big problem was that it only lasted 1 or 2 seconds, so it took us a bit to figure out what attribute it was adding that caused the "element not clickable" exception. Just a thought.

Also, looking at your screenshots, it looks like you are dealing with a modal window. After closing the pop-up, can you implement a wait for that modal tag to no longer exist in the DOM before continuing?

I managed to find a solution thanks to your advice. The modal tag still existed but with one less attribute. Hence I included the wait order with the extra attribute. Once it no longer existed, wait order concluded, and the test moved on.

Thanks a bunch, now I can finish building my auto suite.

I am experiencing this issue intermittently on this page. If you click on the Value Your Trade button (right hand side) a modal dialog opens with a form.

My script fills out this form from top to bottom, entering data in all fields. 30-50% of runs will throw this error when trying to click on the element [id=receiveOffers]. Several times it has claimed that the parent p-tag of the checkbox will be clicked instead.

I experience this exception very frequently, and 99% of the time it is a completely worthless exception that is being thrown on operations that once worked. I've had to create an extension method (JSClick(By)) to execute js that clicks on the element, which is less than ideal.

How are you passing the CAPTCHA on that page?

I'm sorry, but I can't tell you that. It would undermine the captcha itself.

"Element is not clickable at point (x, y)" is a legit case, Selenium throws this exception when you attempt to cllick an element covered by some other element. You should avoid clicking overlapped elements.

Was this page helpful?
0 / 5 - 0 ratings