The errors are
Traceback (most recent call last):
File "C:/Users/Pc/PycharmProjects/SeleniumTest/Demo/Sample.py", line 12, in <module>
driver.find_element_by_name("btnK").send_keys(Keys.ENTER)
File "C:\Users\Pc\PycharmProjects\SeleniumTest\venv\lib\site-packages\selenium\webdriver\remote\webelement.py", line 477, in send_keys
self._execute(Command.SEND_KEYS_TO_ELEMENT,
File "C:\Users\Pc\PycharmProjects\SeleniumTest\venv\lib\site-packages\selenium\webdriver\remote\webelement.py", line 628, in _execute
return self._parent.execute(command, params)
File "C:\Users\Pc\PycharmProjects\SeleniumTest\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "C:\Users\Pc\PycharmProjects\SeleniumTest\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 237, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
(Session info: chrome=87.0.4280.88)
I just came from the selenium PyCharm tutorial from javapoint.com Please help. I am trying to click the search with google button. It gives me the error above. Please help
My code is:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
# Imports Selenium and common keys, like enter
driver = webdriver.Chrome()
# Opens chrome
driver.maximize_window()
# maximize window
driver.get("https://www.google.com/")
# go to webpage google.com
driver.find_element_by_name("q").send_keys("Hello World")
# find the element with the name "q" (search bar) then types "Hello World"
driver.find_element_by_name("btnK").send_keys(Keys.ENTER)