我正在使用无头firefox浏览器来实现自动化。下面是我的代码
System.setProperty("webdriver.gecko.driver","drivers/geckodriver.exe");
System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE,"true");
System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE,"logs.txt");
FirefoxBinary firefoxbinary = new FirefoxBinary();
firefoxbinary.addCommandLineOptions("-headless");
FirefoxOptions firefoxoptions = new FirefoxOptions();
firefoxoptions.setBinary(firefoxbinary);
firefoxoptions.setAcceptInsecureCerts(true);
FirefoxDriver driver = new FirefoxDriver(firefoxoptions);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
以上代码在FF 61.0.2中正常工作。它永远不会要求身份验证弹出。但是将我的FF更新为62.0后,它要求进行身份验证并失败。下面是屏幕截图
Screenshot of browser