我試圖在www.naukri.com中處理多個彈出窗口阻止程序;爲此,我在firefox中創建了一個名爲「AutoProfile」的自定義配置文件。但我在加載這個自定義配置文件在Firefox的驅動程序有問題;無法在FirefoxDriver中加載自定義配置文件:構造函數FirefoxDriver(Firefox配置文件)未定義
System.setProperty("webdriver.gecko.driver", "F:\\abc\\geckodriver-v0.18.0-win64\\geckodriver.exe");
ProfilesIni profile2=new ProfilesIni();
FirefoxProfile profile3=profile2.getProfile("AutoProfile");
profile3.setPreference("browser.popups.showPopupBlocker", false);
driver =new FirefoxDriver(profile3);
driver.get("www.naukri.com");
但我得到一個錯誤在driver=new FirefoxDriver(profile3);
它說:
The constructor FirefoxDriver(FirefoxProfile) is undefined.
有些時候,我得到一個消息作爲構造已被棄用。
感謝您的回覆,我沒有下載最新的磁帶庫和驅動器壁虎。但問題仍然存在.. –