1

My page has an accordion. When I try to click the element, I get the error: "is not clickable at point (741, 503). Other element would receive the click". I feel this is because the elements position has changed from the previous accordion panel opening.

I've tried all the javascript and xpath solutions mentioned.

Code is nothing special:

driver.FindElement(By.Id("FirstPanel")).Click();
// click some things
// do an assert
driver.FindElement(By.Id("NextPanel")).Click();  <-- this is where it fails

Actual message (slightly redacted):

Message: OpenQA.Selenium.ElementClickInterceptedException : element click intercepted: Element <h4 id="MyElementId" data-toggle="collapse" data-target="#TargetName" style="cursor: pointer; color:#60a531;" class="">...</h4> is not clickable at point (741, 503). Other element would receive the click: <div id="AnotherId">...</div> (Session info: chrome=75.0.3770.142)

Greg Burghardt
  • 17,900
  • 9
  • 49
  • 92
Tom Lynch
  • 66
  • 4

1 Answers1

0

The failure could be due to two possible reasons which are

  1. When you perform some clicks after the first statement executes, the DOM structure changes and the original element id is not accessible. In this case, you can investigate it pretty easily. Perform the steps manually till your failing point and then use firebug/chropath to see that does your element really exists with same Id

  2. The second possible reason can be that your element is covered by another element and you are not waiting adequately in the code before clicking. This could also mean that if your UI has iframes involved, the actions which you perform change the context from current iframe to another one.

You can also try to use a JavascriptExecutor in your code for clicking this element

work_ishaan
  • 354
  • 1
  • 8