I'm using selenium python and I have this code, it finds a comment box and then I want to type there a comment. the code finds the comment box but when it tries to type something the code breakes and i get this error:
AttributeError: 'NoneType' object has no attribute 'send_keys.
Thats the code:
no_show = driver.find_element(By.XPATH,"xpath")
no_show.click()
notes = WebDriverWait(driver,60).until(EC.element_to_be_clickable(("id","the id")))
time.sleep(2)
notes = driver.find_element("id", "__area0-inner").click() #(The code fails here)
notes.send_keys("test")
print("test passed")
I tried another explicit wait:
element2 = WebDriverWait(driver,60).until(EC.presence_of_element_located(("id","the id")))
I tried to use notes.clear()
Didnt work.