我无法使用Selenium Webdriver在chrome浏览器中添加扩展名。
我的问题陈述是:我想在Chrome浏览器中添加扩展名 。所以我正在使用这组代码:
public static void initilization() {
ChromeDriver driver = null;
System.setProperty("webdriver.chrome.driver", ".//src//main//java//config//configFolder//chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.addArguments("start-maximized");
options.addArguments("--disable-extensions");
options.addArguments("--auto-open-devtools-for-tabs");
options.addExtensions(new File(".//src//main//java//config//configFolder//0.3.7_0.crx"));
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);*/
driver = new ChromeDriver(capabilities);
}
错误1:ChromeDriver(功能)已弃用,因此无法正常工作
错误2:未知错误:无法等待扩展程序后台页面加载:chrome-extension:
错误3:找不到页面:chrome-extension://jnhgnonknehpejjnehehllkliplmbmhn/_genic_background_page.html