Search code examples
pythonseleniumwebdriver

Selenium error when interacting with textarea


I try to enter text into text area on the web i am using selenium to do this but when i try to input into textarea it fails with error:"selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable". However when i try to put text into field it works normaly

driver.find_element_by_xpath('//textarea[@class = "Ypffh"]').send_keys(text);

Solution

  • You could try it with javascript:

    driver.execute_script('document.querySelector("textarea.Ypffh").innerText = "xxx"')