I am trying to select a text box which is in the form of a <!DOCTYPE html>
Here's the HTML:
I tried pretty much everything and either I end up with nothing. Here's my code
desc =WebDriverWait(browser,30).until(EC.visibility_of_element_located((By.XPATH, '//*[@id="tinymce"]')))
desc.clear()
desc.send_keys("anynaynanya")
If I used the xpath of the iframe I get that error:
Traceback (most recent call last):
File "C:\Users\Dln\Desktop\tstsd.py", line 22, in <module>
desc.clear()
File "C:\Users\Dln\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 95, in clear
self._execute(Command.CLEAR_ELEMENT)
File "C:\Users\Dln\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute
return self._parent.execute(command, params)
File "C:\Users\Dln\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Dln\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidElementStateException: Message: invalid element state
(Session info: chrome=85.0.4183.83)