I'm trying to use selenium to open a webpage with code below
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('bing.com')
i tried to use executable_path=
but it said chromedriver needs to be in PATH
so I added the driver to the path variables
and I think that's not the problem
and also i'm using WSL2
here is the full error
Traceback (most recent call last):
File "/mnt/d/project/src/main.py", line 9, in <module>
driver = webdriver.Chrome()
File "/home/amirhosein/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/home/amirhosein/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 98, in start
self.assert_process_still_running()
File "/home/amirhosein/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 109, in assert_process_still_running
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 1