我收到错误消息“未定义构造函数FirefoxDriver(FirefoxProfile)”
if(data.equals(“ Mozilla”)){ // driver = new FirefoxDriver(); System.setProperty(“ webdriver.gecko.driver”,System.getProperty(“ user.dir”)+“ /geckodriver.exe”); // FirefoxOptions options = new FirefoxOptions(); 字符串fileName = System.getProperty(“ user.dir”)+“ //Nimbus-Screenshot-&-Screen-Video-Recorder_v8.8.1”; FirefoxProfile配置文件=新的FirefoxProfile();
try {
profile.addExtension(new File(fileName));
// Add more FF addons if required
} catch (Exception e) {
}
driver = new FirefoxDriver(profile); // Here I am getting an error
//driver = new FirefoxDriver(options);
driver.manage().window().maximize();
}