Free tools Windows power users keep installed
One-click scans. No signup required.
When Selenium says an element click was intercepted, the target was present, but another element covered the point Selenium tried to click. In headless Chrome, capture the failed page, inspect the target’s center and any overlay, then wait for the page to settle and use a normal WebDriver click. Don’t reach first for a JavaScript click: it can hide the obstruction your test should detect.
What “element not clickable” means
The specific Selenium error is commonly ElementClickInterceptedException. Selenium scrolls an element into view as needed, checks whether it can be interacted with, and attempts the click at its center. If another element obscures that point, the click is intercepted. Being present in the DOM—or even visible—does not prove that the center is clear.
Selenium’s Python API describes ElementClickInterceptedException as occurring when another element obscures the target. This is distinct from ElementNotInteractableException, which signals that the requested interaction cannot be carried out as expected. See the Selenium Python exception API and Selenium element interactions documentation.
“Headless-only” does not by itself identify the cause. Compare the failing run’s viewport, target geometry, page state, timing, and browser/driver versions with a headed run.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →#1 Best Overall
Capture the failure before changing the click
Record evidence at the point of failure; page state may change immediately afterward. A screenshot plus the element’s bounding rectangle helps show whether Selenium’s center point sits beneath a banner, dialog, fixed header, loading layer, or another element.
Python diagnostic example
The following example assumes Selenium 4 and a configured ChromeDriver. Replace the URL and locator with the page and element under test. It deliberately records the failure and re-raises the exception rather than concealing it.
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.common.exceptions import ElementClickInterceptedException
options = webdriver.ChromeOptions()
options.add_argument("--headless")
options.add_argument("--window-size=1440,1000")
driver = webdriver.Chrome(options=options)
try:
driver.get("https://example.com")
target = driver.find_element(By.CSS_SELECTOR, "button.submit")
try:
target.click()
except ElementClickInterceptedException:
driver.save_screenshot("click-failure.png")
print("target rect:", target.rect)
print("viewport:", driver.execute_script(
"return {width: innerWidth, height: innerHeight, "
"scrollX, scrollY};"
))
print("element at center:", driver.execute_script("""
const r = arguments[0].getBoundingClientRect();
const x = r.left + r.width / 2;
const y = r.top + r.height / 2;
const e = document.elementFromPoint(x, y);
return e ? {tag: e.tagName, id: e.id, className: e.className} : null;
""", target))
raise
finally:
driver.quit()
elementFromPoint is a diagnostic snapshot of the page’s hit target at the measured center; it is not a guarantee that the layout will stay unchanged until the next command. If the click is intercepted intermittently, log the screenshot and geometry on each failure and check for movement between measurement and click.
Rank #2
Fix the cause, then click normally
- Identify the covering element. Inspect the screenshot and the center-point result. Determine whether a consent banner, modal, sticky header, loading mask, or other control is covering the button.
- Wait for the relevant application state. If the blocker should disappear, wait for that specific condition. If the target should become ready after loading, wait for that state—not merely for the document’s
readyStateto be complete. - Check scrolling and layout. A target can scroll beneath a fixed overlay, or a layout change can move it after Selenium measured its position. Adjust the page state or wait until the position is stable.
- Check whether the locator points to the real hit target. A compound control may have a child that is actually clickable. If the child is the intended control, locate it directly rather than clicking a parent whose center lies elsewhere.
- Retry with
element.click(). A successful normal click exercises the browser interaction your test is intended to verify. Avoid hiding an unexpected obstruction with a workaround.
Wait for a blocker to disappear
Use an explicit wait tied to the expected page condition. For example, if a known overlay disappears before the button becomes usable:
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
wait = WebDriverWait(driver, 10)
wait.until(EC.invisibility_of_element_located(
(By.CSS_SELECTOR, ".loading-overlay")
))
button = wait.until(EC.element_to_be_clickable(
(By.CSS_SELECTOR, "button.submit")
))
button.click()
Change the selector and timeout to match the application; ten seconds here is an example, not a universal requirement. “Clickable” waits are useful synchronization, but they do not guarantee that an unrelated overlay will not move over the center immediately afterward. If interception persists, capture the failure state and diagnose the actual hit point.
Rank #3
Fixed sleeps are a weak substitute for state-based waits: a short sleep may end too early, and a long one wastes time. Selenium’s waits documentation explains synchronization and warns about timing races between the test and a dynamically changing application.
Why the failure may appear only in headless mode
Headless Chrome still renders a page, but a different viewport or run configuration can produce a different layout and click geometry. Chrome documents unified Headless and headful modes; from Chrome 132.0.6793.0, the old Headless implementation is available only as the separate chrome-headless-shell binary. Check the Chrome Headless mode documentation when diagnosing which mode your setup uses.
Rank #4
Compare headed and headless runs on the same page and record:
- Viewport width and height, including the configured window size.
- The target’s rectangle and center point, and the element at that point.
- Visible overlays and whether the page has finished the relevant application transition.
- Browser and driver versions, plus any difference in run timing or configuration.
This comparison is diagnostic, not proof that headless mode itself causes interception. Selenium’s center-point interaction model and ChromeDriver’s advice to inspect the attempted point make geometry and page state the first things to verify. ChromeDriver also notes that a moving target may shift after its position is measured; it does not guarantee a click on an element that never stops moving. See ChromeDriver clicking issues.
Best Value
Distinguish interception from related Selenium errors
| Symptom | What to investigate |
|---|---|
ElementClickInterceptedException |
Another element covers the attempted center point; inspect overlays, stacking, scrolling, movement, and the actual hit target. |
ElementNotInteractableException |
Check whether the element is displayed, in view, and pointer-interactable. The problem may not be an overlay covering the center during a click. |
NoSuchElementException or a not-ready target |
Verify the locator and wait for the expected application state or element. |
StaleElementReferenceException |
The DOM reference may no longer point to the current element after a replacement or update; locate it again after the change. |
Exception names and details can vary with the language binding and driver. The key distinction is whether the target could not be found, could not be interacted with, was replaced, or had its click point obscured.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.When an offset or JavaScript click is appropriate
An offset click can make sense when the intended user action is specifically at a different point within a control and you have verified that point is clear. A JavaScript-triggered click can be useful for a test whose purpose is to invoke page code rather than validate a user-like pointer interaction. Neither is a universal fix for an intercepted WebDriver click: bypassing the hit test may make a broken or obstructed interface appear to pass. ChromeDriver lists offsets and JavaScript clicks as possible remedies for particular hit-target problems, not as a first response to every interception.
Common failures and what to do
- The overlay is expected to close: wait for the overlay’s invisibility or for the application’s documented close transition; verify the overlay really disappears.
- The overlay should not be present: correct the page state or test setup. Do not silently click through an unexpected consent dialog or loading mask.
- The screenshot looks clear but the click still fails: compare the center coordinates and page state captured at the exact failure; a layout shift or animation may have changed them.
- The target is partly under a fixed header: inspect scroll position and the element’s viewport rectangle, then adjust the scroll/layout condition and verify the center is unobstructed.
- Only one browser configuration fails: align viewport and browser/driver versions first, then compare timing and screenshots before attributing the difference to headless mode.
- A sleep “fixes” it inconsistently: replace the sleep with a wait for the blocker to disappear or the target state to settle, and capture evidence if the click remains intermittent.
Or skip the browser setup
If your immediate need is a page screenshot for diagnosing layout or documenting a URL—not exercising a Selenium interaction—you can request one from ScreenshotNeo’s API. A one-call capture does not replace WebDriver for testing clicks, but it can avoid maintaining a browser setup for screenshot-only work. See the ScreenshotNeo website and API documentation.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
Replace YOUR_API_KEY with your key and change the target URL as needed. ScreenshotNeo removes cookie/consent banners, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses report the page verdict and billing status in headers. Its MCP server gives AI agents screenshot, page-information, and PDF-capture tools. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for 1,000 free screenshots a month—no card required.
Frequently Asked Questions
Does a page reaching readyState complete mean Selenium can click the button?
No. JavaScript-driven application changes can continue after that state; wait for the specific condition that makes the target’s click point usable.
Should I always use JavaScript to click an intercepted element?
No. First identify and correct the obstruction; use JavaScript only when bypassing normal pointer interaction is appropriate to the test.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

