我正在尝试运行一个 selenium 脚本,但它无法检测到 chromedriver 任何人都可以在我尝试运行它时帮我解决这个问题,它给了我一个错误,指出 chromedriver 不存在于特定路径中但是我已经下载并将其保留在下面的特定路径是快照和代码以供参考。
预订.py
import booking.constants as const
from selenium import webdriver
class Booking(webdriver.Chrome):
def __init__(self , driver_path = "C:\\chromedriver.exe"):
self.driver_path = driver_path
super(Booking, self).__init__()
def land_first_page(self):
self.get(const.BASE_URL)
run.py //在我的编辑器中运行这个python文件
from booking.booking import Booking
inst = Booking()
inst.land_first_page()