您应该先阅读Selenium Wiki中的chromedriver文档。可在此处获得-http:
//pre.google.com/p/selenium/wiki/ChromeDriver
如Wiki中所述:-同样,要在Chrome启动时加载扩展程序:
DesiredCapabilities capabilities = DesiredCapabilities.chrome(); capabilities.setCapability("chrome.switches", Arrays.asList("--load-extension=/path/to/extension/directory")); WebDriver driver = new ChromeDriver(capabilities);
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)