Selenium: ElementNotInteractableException: element not interactable
Last verified
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#elementnotinteractableexceptionWhat it means
The element exists in the DOM, but the driver cannot perform the requested interaction on it. Usually it is not visible (zero size, display: none, visibility: hidden, off-screen in a closed menu), so there is nothing a user could click or type into. It also occurs when the action does not make sense for the element, for example calling send_keys on a div that is not editable, or clear() on something that is not a form field.
Firefox's GeckoDriver often phrases the same condition as Element <input> could not be scrolled into view. Older Selenium versions used ElementNotVisibleException for the visibility case; current drivers return ElementNotInteractableException.
What is not wrong: the locator found an element. It found one you cannot interact with, often a hidden duplicate.
What it looks like
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
menu = driver.find_element(By.CSS_SELECTOR, "nav .account")
ActionChains(driver).move_to_element(menu).perform() # reveal submenu
logout = WebDriverWait(driver, 10).until(
EC.element_to_be_clickable((By.LINK_TEXT, "Log out")))
logout.click()Why it happens
- The locator matches a hidden element first, such as a mobile copy of a form or a template.
- The element is in a closed dropdown, collapsed panel or inactive tab.
- send_keys is called on a wrapper element rather than the actual input inside it.
- The element is visible only after an animation or after hovering its parent.
- The window size triggers a responsive layout where the element is hidden.
How to fix it
- Wait for visibility, not just presence: EC.visibility_of_element_located or EC.element_to_be_clickable.
- Make the locator target the visible, interactive element (the input itself, not its container).
- Perform the step that reveals it first: open the menu, expand the section, hover with ActionChains.
- Check how many elements match: len(driver.find_elements(...)) and pick the displayed one with el.is_displayed().
- Set a desktop window size with driver.set_window_size(1366, 900) or the --window-size argument.
How to stop it recurring
Script the same reveal steps a user would take, and wait for visibility rather than presence before interacting. Write locators scoped to the visible region of the page, and run headless sessions with an explicit desktop window size so responsive layouts do not hide elements unexpectedly.
Official documentation: www.selenium.dev/documentation/webdriver/troubleshooting/errors/#elementnotinteractableexception. See all Selenium error messages.
Related errors
- ElementClickInterceptedException: element click interceptedselenium.common.exceptions.ElementClickInterceptedException: Message: element…
- NoSuchElementException: Unable to locate elementselenium.common.exceptions.NoSuchElementException: Message: no such element:…
- MoveTargetOutOfBoundsException: move target out of boundsselenium.common.exceptions.MoveTargetOutOfBoundsException: Message: move…
Definitions
- SeleniumSelenium is an open-source browser automation project, best known for Selenium WebDriver, a library that contr
- ChromeDriverChromeDriver is the Chromium project's standalone server that implements the W3C WebDriver standard for Chrome
- CSS SelectorA CSS selector is a pattern used to identify and target specific HTML elements on a web page, widely used in b
- Headless ChromeHeadless Chrome is Google Chrome running without a visible window. It renders pages and runs JavaScript like n
- IframeAn iframe (inline frame) is an HTML element that embeds a separate web page within a parent page, creating an
- Web ElementA web element is any individual component rendered on a web page — buttons, links, input fields, images, text
Quick answers
What does "ElementNotInteractableException: element not interactable" mean in Selenium?
The element exists in the DOM, but the driver cannot perform the requested interaction on it. Usually it is not visible (zero size, display: none , visibility: hidden , off-screen in a closed menu), so there is nothing a user could click or type into.
How do I fix "ElementNotInteractableException: element not interactable"?
1. Wait for visibility, not just presence: EC.visibility_of_element_located or EC.element_to_be_clickable. 2. Make the locator target the visible, interactive element (the input itself, not its container). 3. Perform the step that reveals it first: open the menu, expand the section, hover with ActionChains. 4. Check how many elements match: len(driver.find_elements(...)) and pick the displayed one with el.is_displayed(). 5. Set a desktop window size with driver.set_window_size(1366, 900) or the --window-size argument.
Run browser automation you can watch and take over
Autonoly runs each job in a real cloud Chromium browser driven by Playwright. Timeouts and detached elements still happen; the difference is that you can watch the run live, see the step that failed, and take control of the browser to finish it.
Also see Live browser control.