Skip to content Skip to sidebar Skip to footer

Selenium: Element Not Clickable ... Other Element Would Receive Click

When running Selenium tests on my Django project, I've started to get the error: selenium.common.exceptions.WebDriverException: Message: Element is not clickable at point (61, 24.

Solution 1:

Extremely late to the party, but I have an extremely simple solution that worked for me. Instead of doing .click(), simply do

.send_keys(selenium.webdriver.common.keys.Keys.SPACE)

With the element selected, the spacebar can toggle the selection. Worked for me!


Solution 2:

Your Answer lies within your question.

  1. Error says 'add_task_sidebar_link' not clickable at point - (61, 24.300003051757812) This is where another element is - Other element would receive the click: <a class="navbar-brand" href="#"></a> where the click is being attempted. Since you did not maximize the browser, you are not able to get the point co ordinates correctly.
  2. In order for future tests to not break, pls scroll to that element. Refer to this post (Selenium python unable to scroll down). Check Action chains (http://selenium-python.readthedocs.org/api.html#module-selenium.webdriver.common.action_chains)

Solution 3:

Ran into a similar problem (same error) and tried Major Major's solution above using send_keys + sending the space bar to simulate a click rather than a mouse click.

Major Major's solution:

.send_keys(selenium.webdriver.common.keys.Keys.SPACE)

I hit a new error trying to run this, pointing at 'selenium'. Removing that keyword from the code fixed the issue, and allowed me to click the element.

Final successful code snippet used:

my_variable = driver.find_element_by_xpath('//*[@id="myId"]') #this is the checkbox
my_variable.send_keys(webdriver.common.keys.Keys.SPACE)

Solution 4:

I had the same issue: due to a pop-up window, the element I had to click on would drift off the screen and become unclickable.

Scrolling the page to the element worked.

In Python:

elem = driver.find_element_by_tag_name("html")
elem.send_keys(Keys.END)

Solution 5:

This has more to do with elements 'covering' each other. Which makes sense if it's happening on non-maximized windows. Could also happen if there was a popup/floating div or another element which covering the element you're actually trying to click on.

Remember, selenium is mimicking the user, so you can't normally do an action which the user wouldn't have been able to do - like click on an element which is covered by another.

A potential workaround for this would be to use Javascript to find the element and click on it. Example here:

labels = driver.find_elements_by_tag_name("label")
inputs = driver.execute_script(
    "var labels = arguments[0], inputs = []; for (var i=0; i < labels.length; i++){" +
    "inputs.push(document.getElementById(labels[i].getAttribute('for'))); } return inputs;", labels)

Post a Comment for "Selenium: Element Not Clickable ... Other Element Would Receive Click"