【问题标题】:i got message 'chromedriver.exe' executable needs to be in PATH我收到消息“chromedriver.exe”可执行文件需要在 PATH 中
【发布时间】:2020-04-25 01:01:09
【问题描述】:

我试图让 selenium 与 goorm 一起工作,但它不起作用。 我正在使用 goorm IDE,它是一种云服务。

from selenium import webdriver
driver = webdriver.Chrome("C:Users/chromedriver.exe")

运行时,我收到以下消息: 'chromedriver.exe' 可执行文件需要在 PATH 中。请看https://sites.google.com/a/chromium.org/chromedri

【问题讨论】:

  • 你确定你的路径是正确的吗?
  • 放到C:\Windows
  • @jykim 你能告诉我们它解决了你的问题吗??

标签: python selenium ide


【解决方案1】:

检查以下内容:

driver = webdriver.Chrome("C:/Users/chromedriver.exe")

Path中添加chromedriver.exe的路径,在Environmental Variable

如果您使用的是Windows

  1. 右键单击My Computer 并转到Properties
  2. 选择Advanced system settings
  3. 转到标签Advanced
  4. 点击Environment Variables
  5. System Variables 部分搜索Path 变量
  6. 双击它并将chromedriver.exe的路径添加到其value列表中

【讨论】:

  • 在 Windows 中,/ 斜杠不用于路径,而是应该使用双 `\` 斜杠。
  • 尝试在Environmental Variable中添加chromedriver.exe的路径
  • @Marcos 我们可以在 Windows 中使用/ 以及路径
  • 尝试在Path中添加chromedriver.exe的路径,在Environmental Variable
  • 右键单击我的电脑并转到属性>>选择高级系统设置>>转到选项卡高级>>单击环境变量>>在系统变量部分中搜索路径变量>>双击它并在其值列表中添加 chromesriver.exe 的路径
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-05-28
  • 2021-06-16
  • 2017-12-08
  • 2020-09-11
  • 1970-01-01
  • 2017-03-04
  • 2018-02-14
相关资源
最近更新 更多