Selenium WebDriver throws Exception in thread “main”
org.openqa.selenium.ElementNotInteractableException 1 answer
How to resolve ElementNotInteractableException: Element is not visible
in Selenium webdriver? 3 answers
I tried these two, and got nothing out of them.
This element is input element, and I need to send specific variable to it.
Here is the element:
<input name="ds_nm" id="ds_nm" type="text" size="11" maxlength="40"
value="ENTER NAME" title="ENTER NAME" class="grayInput"
onfocus="text_clear()" onblur="text_hint()"
onkeypress="if(event.keyCode == 13){SearchSano();}">
and here is what I wrote so far:
import time
import requests
from selenium.webdriver.common.action_chains import ActionChains
driver = webdriver.Chrome('./chromedriver')
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.support.ui import Select
driver = webdriver.Chrome('./chromedriver')
url="ICAN'T SHARE PERSONAL INFO, SORRY"
ConsumerName="MR.Anderson"
driver.get(url)
time.sleep(5)
CN_Insert = driver.find_element_by_css_selector('form#ds_nm')
hov = ActionChains(driver).move_to_element(CN_Insert)
hov.perform()
CN_Insert.clear()
CN_Insert.send_keys(ConsumerName)
I am safely assuming that I need to activate input menu by clicking the placeholder text. But I just can't code it right.
Note
Reposted at the request of Kajal Kundu.