'How to fix element not interactable using Selenium Python
How to fix element not interactable selenium py
I want to input in address but its showing response like that
Element image:

My code:
driver.find_element_by_class_name('input-group').click()
time.sleep(1)
driver.find_element_by_class_name('input-
group').send_keys('sometext')
Error:
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
Solution 1:[1]
I can’t test this but I think you cannot enter something in the div. You have to do get the input element by id. As the Id you enter: input-6199bf2c
Solution 2:[2]
To send a character sequence to the element you need to induce WebDriverWait for the element_to_be_clickable() and you can use the following locator strategy:
Using XPATH:
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//label[contains(., 'Address')]//following::div[1]/input[starts-with(@id, 'input') and contains(@class, 'form-control-alternative')]"))).send_keys("PermataIndah")Note: You have to add the following imports :
from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Hellstormer |
| Solution 2 |
