0
python代碼無法找到geckodriver。FireFox webdriver錯誤
import time
from selenium import webdriver
browser=webdriver.Firefox('D:/Folder_1/chrome_driver/geckodriver_win32/geckodriver.exe')
錯誤:WindowsError:[錯誤267]的目錄名稱是無效的:'d:/Folder_1/chrome_driver/geckodriver_win32/geckodriver.exe/ 。'
只有2個反斜槓,** 'd:\\ geckodriver.exe' **如果在Windows – Stack
actaul路徑爲:d:/Folder_1/chrome_driver/geckodriver_win32/geckodriver.exe – karthi
做到這一點 'browser = webdriver.Firefox('D:\\ Folder_1 \\ chrome_driver \\ geckodriver_win32 \\ geckodriver.exe')' – Stack