0

I try to search by element name: login_form = driver.find_element_by_name('username') login_form.click()

receive this error:

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

how to fix this ?

2 Answers 2

0

You have to introduce explicit wait until that element becomes interactable before clicking it. Try this :

login_form = WebDriverWait(driver, 20).until(
EC.element_to_be_clickable((By.NAME, "username")))

login_form.click();

Note: Add below imports in your code :

from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
Sign up to request clarification or add additional context in comments.

Comments

0

This error occurred due to elements are not found correctly, because page is not loaded correctly. So, you can give some time to load page using any one of the following statements.

1) time.sleep(10) 2) driver.implicitly_wait(10)

import time

user_name = "[email protected]"
password = "xyz"

login = driver.find_element_by_id("LoginForm_email")
loing_passwd = driver.find_element_by_id("LoginForm_password")
time.sleep(10)
driver.implicitly_wait(10)
login.send_keys(user_name)
login_passwd.send_keys(password)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.