文件解压后最好将gecko_driver文件名修改为geckodriver再用,本人所用火狐版本为58.0.2,将文件解压至任意路径下,代码调用方法System.setProperty("webdriver.gecko.driver", "F:\\googledown\\geckodriver-v0.19.1-win64\\geckodriver.exe"); dr = new FirefoxDriver();