selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable when clicking on an element using Selenium Python

This error message…

selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable

…implies that the desired element was not interactable when you tried to invoke click() on it.

A couple of facts:

  • When you initialize the Chrome browser always in maximized mode.
  • You can disable-extensions.
  • You need to disable-infobars as well.

I have used the same xpath which you have constructed and you can use the following solution:

  • Code Block:

    from selenium import webdriver
    from selenium.webdriver.support.ui import WebDriverWait
    from selenium.webdriver.support import expected_conditions as EC
    from selenium.webdriver.common.by import By
    
    options = webdriver.ChromeOptions()
    options.add_argument("start-maximized");
    options.add_argument("disable-infobars")
    options.add_argument("--disable-extensions")
    driver = webdriver.Chrome(chrome_options=options, executable_path=r'C:\Utility\BrowserDrivers\chromedriver.exe')
    driver.get("https://www.goeventz.com/")
    WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "//a[@track-element="header-login"]"))).click()
    
  • Browser Snapshot:

login_page

Leave a Comment