← Glossary / ElementClickInterceptedException

What is ElementClickInterceptedException?

ElementClickInterceptedException is a WebDriver error thrown when an automation script attempts to click a target element, but another element — typically a modal, cookie banner, sticky header, or loading overlay — obscures it at the exact coordinates of the click. For scraping pipelines relying on browser automation, it is the most common cause of brittle navigation flows and silent job failures.

WebDriverUI AutomationScraping ErrorsHeadless BrowsersDOM State
// 02 — definitions

Blocked at
the glass.

Why your script can see the element in the DOM, but the browser engine refuses to click it.

Ask a DataFlirt engineer →

TL;DR

The exception occurs because WebDriver simulates real user input. Before dispatching the click event, it calculates the element's center coordinates and checks the z-index stack. If a cookie banner or transparent overlay is on top, the click hits the overlay instead, triggering the exception.

01Definition & structure

ElementClickInterceptedException is an error thrown by browser automation frameworks (like Selenium) when a script attempts to click an element, but the browser determines that a real user would not be able to do so because another element is physically covering it.

When you command WebDriver to click, it doesn't just fire an event. It calculates the exact X and Y coordinates of the center of the target element, then asks the browser: "What is the topmost element at this pixel?" If the answer is a cookie banner, a sticky navigation bar, or a transparent loading mask, the click is aborted and the exception is thrown.

02Common culprits

The most frequent causes of click interception in scraping pipelines are:

  • Cookie and GDPR banners: Fixed at the bottom of the screen, blocking pagination links.
  • Sticky headers: When scrolling an element into view, it may end up positioned underneath a fixed top navigation bar.
  • Loading overlays: Transparent `div` elements that cover the screen while AJAX requests complete.
  • Promotional modals: Newsletter sign-ups that appear after a few seconds of dwell time.
03The JavaScript workaround

A common, albeit flawed, workaround is to execute the click via JavaScript: driver.execute_script("arguments[0].click();", element). This bypasses the browser's hit-test entirely, forcing the click event onto the element regardless of what is covering it.

While this prevents the exception, it is highly detectable by anti-bot systems. Native clicks generate a chain of trusted events (mousemove, mousedown, mouseup, click) with specific coordinate data. JavaScript clicks lack this physical realism, instantly flagging the session as automated.

04How DataFlirt handles it

We treat click interception as a symptom of unmanaged DOM state. Our browser orchestration layer actively manages the viewport before any interaction occurs. We automatically identify and dismiss known modal patterns, inject CSS to hide sticky headers during scroll operations, and wait for network-idle states to ensure loading masks have detached.

By ensuring the interaction surface is clean, we maintain the ability to use native, trusted click events — keeping our bot scores low and our pipelines resilient.

05Did you know?

WebDriver always attempts to click the exact mathematical center of an element. If you are trying to click a large image or a wide banner, and only the center is obscured by a small badge or icon, the click will fail. Advanced scraping scripts often calculate custom offsets to click the top-left corner of an element to avoid center-positioned overlays.

// 03 — the click model

How WebDriver
validates a click.

Before firing a native click event, the browser engine performs a hit test. If the target element isn't the topmost node at the calculated coordinates, the click is aborted.

Target coordinates = (x, y) = (rect.left + rect.width / 2, rect.top + rect.height / 2)
WebDriver defaults to clicking the exact center point of the bounding client rect. W3C WebDriver Specification
Hit test = top_node = document.elementFromPoint(x, y)
The browser queries the DOM to find which element is visually on top at those coordinates. DOM API
Exception condition = if (top_node !== target_node) throw InterceptedError
If the top node is a modal or banner, the click is blocked to prevent unintended interactions. Browser Engine Implementation
// 04 — the stack trace

When a cookie banner
kills the pipeline.

A standard Selenium Python trace failing on an e-commerce pagination button because a GDPR consent modal slid into the viewport.

SeleniumPythonTraceback
edge.dataflirt.io — live
CAPTURED
// [INFO] Navigating to category page...
// [INFO] Waiting for pagination button to be clickable...
element.state: present in DOM
element.visibility: visible

Traceback (most recent call last):
File "scraper.py", line 42, in <module>
next_btn.click()
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted:
Element <a class="next-page">...</a> is not clickable at point (450, 920).
Other element would receive the click: <div id="gdpr-consent-banner" class="overlay">...</div>

pipeline.status: FATAL
records.extracted: 0
// 05 — failure modes

What intercepts
the click.

The most frequent DOM elements responsible for click interception across DataFlirt's headless browser fleet. Numbers reflect automated UI interaction failures prior to heuristic dismissal.

SAMPLE SIZE ·  ·  ·  ·    1.4M UI errors
WINDOW ·  ·  ·  ·  ·  ·   30d trailing
UPDATED ·  ·  ·  ·  ·  ·  2026-05-19
01

Cookie / GDPR consent banners

fixed bottom/center · Blocks pagination and footer links
02

Promotional modals

viewport center · Newsletter popups, discount offers
03

Sticky headers

fixed top · Intercepts elements scrolling upward
04

Transparent loading masks

full viewport · AJAX spinner overlays
05

Chat widgets

fixed bottom-right · Blocks 'Next' or 'Submit' buttons
// 06 — our approach

Don't just catch the error,

anticipate the overlay.

Relying on try/catch blocks and JavaScript click fallbacks creates brittle pipelines that fail silently when site layouts change. DataFlirt's browser orchestration layer uses a pre-click heuristic: before interacting with a target, we map the z-index stack, auto-dismiss known modal patterns like consent banners and chat widgets, and ensure the viewport is scrolled to provide a clean hit-test. If an interception still occurs, the worker captures a DOM snapshot and visual trace for the auto-healing engine.

Click execution trace

A live interaction event handled by DataFlirt's orchestration layer.

target.selector button.add-to-cart
hit_test.status intercepted
intercepting.node div#onetrust-banner
action.auto_dismiss executed
hit_test.retry clear
click.dispatch native_event
pipeline.status recovered

Stay ahead of the pipeline

Data engineering
intel, weekly.

Anti-bot shifts, scraping infrastructure updates, dataset delivery patterns, and business outcomes from our pipelines. Short, technical, no fluff.

// 07 — FAQ

Common
questions.

Common questions about UI automation failures, JavaScript workarounds, and reliable element interaction.

Ask us directly →
How do I fix ElementClickInterceptedException? +
The most robust fix is to remove the obstruction. Scroll the element into the center of the viewport, wait for loading overlays to disappear using explicit waits, or explicitly click the 'Accept' button on cookie banners before proceeding with your main scraping logic.
Why does arguments[0].click() work when native click fails? +
Executing a click via JavaScript bypasses the browser engine's hit-test and event bubbling simulation. It forces the click event directly onto the DOM node, regardless of whether it is visually obscured or off-screen.
Is it bad practice to always use JavaScript clicks? +
Yes, especially for scraping. JavaScript clicks do not trigger CSS hover states, focus events, or trusted event listeners in the same way a native user interaction does. Modern anti-bot systems monitor these event properties to detect automated headless browsers.
How does DataFlirt handle unpredictable promotional popups? +
We maintain a global registry of modal signatures. Our browser orchestration layer evaluates the DOM upon page load and auto-dismisses known popups at the CDP layer before the main extraction logic runs, ensuring a clean interaction surface.
Why does the error happen even when I use Explicit Waits? +
Standard explicit waits like ExpectedConditions.elementToBeClickable only check if the element is present in the DOM, visible, and enabled. They do not calculate the z-index stack to verify if the element is unobscured by a higher-layer element.
Does this error happen in Playwright and Puppeteer? +
Yes, though the exact error name differs. Playwright, for example, performs actionability checks before clicking. If an element is obscured, Playwright will wait for it to become unobscured, eventually throwing a TimeoutError or an 'element is intercepted' log if the overlay never disappears.
$ dataflirt scope --new-project --target=elementclickinterceptedexception READY

Tell us what
to extract.
We do the rest.

20-minute scoping call. Pilot dataset within the week. Production within two. Whether you need a one-off catalogue dump or a continuous feed across millions of records — we scope, build, and operate the pipeline.

hello@dataflirt.com  ·  Bengaluru  ·  IST  ·  typical reply < 4h