Jithin Palepu
Jithin Palepu

Reputation: 814

ElementNotInteractableException in Selenium when trying to automate browser

When I am trying to enter the input in the given field I get an error saying

selenium.common.exceptions.ElementNotInteractableException: Message: Element <input class="text-input email-input js-signin-email" name="session[username_or_email]" type="text"> is not reachable by keyboard

I tried increasing the timer.sleep() from 10 seconds to 15 seconds. I found no fix.

Upvotes: 1

Views: 91

Answers (1)

Ratmir Asanov
Ratmir Asanov

Reputation: 6459

Use explicit wait instead:

from selenium.webdriver.support import ui
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By


input_filed = ui.WebDriverWait(driver, 10).until(
    EC.element_to_be_clickable((By.CSS_SELECTOR, "input.text-input.email-input.js-signin-email")))
# Do actions with input element.

Hope it helps you!

Upvotes: 1

Related Questions