'MacOS Chrome WebDriver 'Element Click Intercepted element click intercepted' exception is thrown using click() on WebElement that is not in a viewport [duplicate]

Starting from Google Chrome Browser 98 version, currently on Version 99.0.4844.83 as well, I observe weird behavior when use ordinary Selenium click() method on ordinary WebElement if it's not in a viewport. So I haven't performed any changes with my environment, Chrome WebDriver or imported to my framework Selenium library; the only change is autoupdating of Chrome Browser. Hence I bet the root cause of my problem is because of that.

I must mention that previously I have never seen such behavior before. So for example: If I try to click on any located WebElement, that is already found in DOM, but is not in a viewport, I get 'ElementClickIntercepted element click intercept...' exception.

  • Now: If I want to click on a button that is displayed, but not in a viewport, the viewport will be scrolled to that element and the above mentioned exceptions is thrown just after implicit scrolling to it.
  • Before: If I want to click on a button that is displayed, but not in a viewport, the button is clicked immediately without implicit scrolling to it.

Has anybody faced such behavior as me? Any thoughts about it?

P.S. Initially I haven't updated Chrome WebDriver and I started to observe such behavior. After that I decided to update Chrome WebDriver to make it consistent with the latest version of Chrome Browser. Both preconditions causes the same consequences.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source