-2

Facing the following error when using

driver.find_element_by_id(element_id).click() 

to click a disabled element.

**Error:** ... is not clickable at point (1585, 222). Other element would receive the click:
Sahana
  • 1
  • 4
  • 1
    Can u post complete stack trace – NarendraR Aug 03 '17 at 13:26
  • Sorry, cannot share raw traceback for security reasons. What else may help? – Sahana Aug 03 '17 at 13:48
  • Possible duplicate of [Selenium Web Driver & Java. Element is not clickable at point (36, 72). Other element would receive the click:](https://stackoverflow.com/questions/44912203/selenium-web-driver-java-element-is-not-clickable-at-point-36-72-other-el) – undetected Selenium Aug 03 '17 at 13:52
  • If you "can't share the traceback," then you need a [mcve]. Actually, you need one anyway. – jpmc26 Aug 03 '17 at 14:29
  • Will try to screen info: WebDriverException: Message: unknown error: Element – Sahana Aug 03 '17 at 14:33
  • 'name': 'chocolate' + $index() }" name="chocolate" id="chocolate"> is not clickable at point (1585, 222). Other element would receive the click: – Sahana Aug 03 '17 at 14:34
  • 1
    Please edit your question and put all relevant info inside the question instead of in comments so it's more easily found. – JeffC Aug 03 '17 at 14:38
  • The element isn't disabled. Another element would receive the click so some other element is on top of the element you are trying to click. This could be something like a dialog or a sidebar or it could be that the page was still loading, resizing content when you tried to click. We can't tell because you haven't provided any details. – JeffC Aug 03 '17 at 14:40
  • Thanks @JeffC ! there was a tiny icon over the label I was trying to click! Finally worked! – Sahana Aug 03 '17 at 14:58

2 Answers2

0

try this

driver.execute_script('arguments[0].click();', driver.find_element_by_id(element_id))
Satish
  • 1,976
  • 1
  • 15
  • 19
0

The element isn't disabled. Another element would receive the click so some other element is on top of the element you are trying to click. This could be something like a dialog or a sidebar or it could be that the page was still loading, resizing content when you tried to click. We can't tell because you haven't provided any details. – JeffC 27 mins ago

https://stackoverflow.com/users/2386774/jeffc

Sahana
  • 1
  • 4