尝试使用Selenium访问Google时遇到错误?

时间:2020-05-16 04:54:10

标签: python-3.x selenium error-handling selenium-chromedriver

我的代码:

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>

0 个答案:

没有答案