Skip to content
Selenium WebDriver · error message

Selenium: ElementNotInteractableException: element not interactable

Permanent - do not retryClicking & interacting

Last verified

The exact message
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#elementnotinteractableexception

What 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

  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.

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

Definitions

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.