我的代码:
from selenium import webdriver
browser=webdriver.Chrome(r"C:\Users\Roshan\anaconda3\condabin")
browser.get('https://www.google.com')
我的终端的回复:
C:\Users\Roshan>python c:/Users/Roshan/auto.py
Traceback (most recent call last):
File "C:\Users\Roshan\anaconda3\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "C:\Users\Roshan\anaconda3\lib\subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "C:\Users\Roshan\anaconda3\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
PermissionError: [WinError 5] Access is denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:/Users/Roshan/auto.py", line 2, in <module>
browser=webdriver.Chrome(r"C:\Users\Roshan\anaconda3\condabin")
File "C:\Users\Roshan\anaconda3\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in __init__
self.service.start()
File "C:\Users\Roshan\anaconda3\lib\site-packages\selenium\webdriver\common\service.py", line 88, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'condabin' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
C:\Users\Roshan>