小编Fer*_*ldi的帖子

Python Selenium Chrome Webdriver

我开始自动化无聊的东西书,我正在尝试通过python打开一个chrome web浏览器.我已经安装了硒和

我试过运行这个文件:

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys

browser = webdriver.Chrome()
browser.get('https://automatetheboringstuff.com')
Run Code Online (Sandbox Code Playgroud)

但正因为如此,我得到这个错误:

Traceback (most recent call last):   File "C:\Program Files
   (x86)\Python36-32\lib\site-packages\selenium\webdriver\common\service.py",
 line 74, in start
     stdout=self.log_file, stderr=self.log_file)   File "C:\Program Files (x86)\Python36-32\lib\subprocess.py", line 707, in __init__
     restore_signals, start_new_session)   File "C:\Program Files (x86)\Python36-32\lib\subprocess.py", line 990, in _execute_child
     startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified
Run Code Online (Sandbox Code Playgroud)

在处理上述异常期间,发生了另一个异常:

Traceback (most recent call last):   File "C:/Program Files
(x86)/Python36-32/test.py", line 5, in <module>
    browser = …
Run Code Online (Sandbox Code Playgroud)

python selenium selenium-chromedriver

28
推荐指数
2
解决办法
9万
查看次数

标签 统计

python ×1

selenium ×1

selenium-chromedriver ×1