1

I have recently upgraded selenium to the latest version (2.53), and firefox to the latest version (45.0.1).

I run the same code on the same websites, but I suddenly have many exceptions like this:

WebDriverException: Message: Element is not clickable at point (312, 8.816665649414062). Other element would receive the click:

For example:

driver.find_element_by_class_name('my_class_name').click()

Is there something new that I should be aware of? My previous python selenium version was reasonably old, and I was on firefox 38.

5
  • well, the code you have here wouldn't work because you're attempting to click() on an array that was returned by find_elements_by_class_name(). Could you show us some more code where you specifically get this Exception? Commented Mar 21, 2016 at 21:51
  • The only thing I can think of is that the older version of selenium wasn't properly recognizing that something else was displayed over your target, or your app behavior has changed so that it now has something in the way. Commented Mar 21, 2016 at 21:53
  • I corrected this. This is the code I had. I fixed the problem by actually executing some javascript to click on the button. It's more reliable. Commented Mar 21, 2016 at 21:53
  • its an intermittent issue which makes it so hard to work out whether its the code or (in my wild fantasy) a system admin fighting back against crawling activity. This issue has been flagged up here- but is by no means limited to the Chrome driver. Commented Mar 22, 2016 at 10:58
  • I agree. It's a real pain and has cost me many hours of debugging. Commented Mar 22, 2016 at 11:07

2 Answers 2

1

Here's the solution I found:

driver.execute_script("arguments[0].click();", element)

It works, and reliably clicks on the element.

Sign up to request clarification or add additional context in comments.

Comments

0

Solution that worked for me to Solve element is not clickable at point(x,y) exception

1-Updated chrome driver to latest one 2.15

2-Get the coordinate then click on the link or button

3-Try to click using Y coordinates

# Find an element
WebElement elementToClick = driver.findElement(By.xpath("Your xpath"));

# Scroll the browser to the elements Y position 
((JavascriptExecutor)driver).executeScript("window.scrollTo(0," + elementToClick.getLocation().y + ")");

# Click the element
elementToClick.click();

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.