The constructor FirefoxDriver(FirefoxBinary, FirefoxProfile) is undefined
FirefoxDriver Constructor (FirefoxBinary, FirefoxProfile) | WebDriver |
Note: This API is now obsolete.
selenium-java-3.6.0 这种构造函数已经不用了
使用如下可解决
System.setProperty("webdriver.gecko.driver", "D:\\Software\\GeckoDriver32\\geckodriver.exe");
MyLog.logger.info("Initializing the Firefox webdriver.....");
System.setProperty("webdriver.firefox.bin",
"D:\\Software\\firefox\\firefox.exe");
driver =new FirefoxDriver();