Python - selenium gets error: Message: Element is not reachable by keyboard
The target url launches fine, but I'm unable to figure out why it's not entering the sample text, "text".
code:
from selenium import webdriver
driver = webdriver.Firefox() driver.get("https://www.youtube.com/")
searchbox = driver.find_element_by_xpath('//*[@id="search"]') searchbox.send_keys("test")
searchbutton = driver.find_element_by_xpath('//*[@id="search-icon-legacy"]') searchbutton.click()
error:
Traceback (most recent call last): File "/Users/MacBook/Desktop/selenium_test.py", line 7, in searchbox.send_keys("test") File "/Applications/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 479, in send_keys 'value': keys_to_typing(value)}) File "/Applications/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute return self._parent.execute(command, params) File "/Applications/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/Applications/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotInteractableException: Message: Element is not reachable by keyboard
Thanks in advance.
from Recent Questions - Stack Overflow https://ift.tt/37KN2AK
https://ift.tt/eA8V8J
Comments
Post a Comment