ElementNotInteractableException: Message: element not interactable error while sending text to Email field on Quora using Selenium with Python

ganidat picture ganidat · May 2, 2019 · Viewed 9.6k times · Source

Here is my code:

from selenium import webdriver

user = "[email protected]"

browser = webdriver.Chrome("/path/to/browser/")

browser.get("https://www.quora.com/")

username = browser.find_element_by_name("email")

browser.implicitly_wait(10)

username.send_keys(user)

Here is the error message:

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

I think there is another thread with a similar issue. Either the solutions in that thread didn't work for me or I don't know how to implement the solutions.

Answer

cruisepandey picture cruisepandey · May 2, 2019
find_element_by_name("email")

is present multiple times in DOM. So that wouldn't work.

You can try with this css selector :

input[class*='header_login_text_box'][name='email']  

Code :

username = browser.find_element_by_css_selector("input[class*='header_login_text_box'][name='email']")

username.send_keys("[email protected]")