【发布时间】:2016-01-29 22:34:34
【问题描述】:
这是我的代码:
from selenium import webdriver
driver = webdriver.Chrome()
driver.get("https://www.google.com/")
然后在 Windows PowerShell 中我得到:
PS C:\Users\userName\PycharmProjects\untitled> python .\s_Chrome.py
Traceback (most recent call last):
File "C:\Users\userName\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium-2.49.2-py3.5.egg\selenium\webdriver\common\service.py", line 62,
in start
stdout=self.log_file, stderr=self.log_file)
File "C:\Users\userName\AppData\Local\Programs\Python\Python35-32\lib\subproce
ss.py", line 950, in __init__
restore_signals, start_new_session)
File "C:\Users\userName\AppData\Local\Programs\Python\Python35-32\lib\subproce
ss.py", line 1220, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
我需要在 PATH 中添加一些东西吗?
【问题讨论】:
标签: python google-chrome selenium