【发布时间】:2018-12-01 15:23:45
【问题描述】:
我想在我的 heroku 应用上使用 selenium。所以我添加了以下构建包。
以下是使用 selenium、chrome 和 chromedriver 的 python 代码
from selenium import webdriver
# from selenium.webdriver.chrome.options import Options
import os
import pickle
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.chrome.options import Options as ChromeOptions
chrome_bin = os.environ.get('GOOGLE_CHROME_SHIM', None)
opts = ChromeOptions()
opts.binary_location = chrome_bin
driver = webdriver.Chrome(executable_path="chromedriver",
chrome_options=opts)
我收到以下错误 FileNotFoundError: [Errno 2] 没有这样的文件或目录:'chromedriver': 'chromedriver'
请帮帮我。
【问题讨论】:
标签: python google-chrome selenium heroku selenium-chromedriver