I just started python study and am trying to making a program by copying a youtuber's code line by line.
The code is like this:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
url = 'https://google.com'
driver.get(url)
driver.find_element_by_css_selector("search-icon").send_keys('banana')
What I tried is to open a google page using chrome and type banana into search icon. but the error message occured
Error message :
File "C:\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created
from disconnected: unable to send message to renderer
(Session info: chrome=83.0.4103.97)
I think I have the right version of chrome driver and it is at the same directory with the python code where the python is installed.
Please help.