2014-12-23 125 views

回答

0

对于Firefox和Chrome,可以通过提供功能或配置文件。例如在Firefox的情况下:

File file = new File(“firebug-1.8.1.xpi”); FirefoxProfile firefoxProfile = new FirefoxProfile(); firefoxProfile.addExtension(file); firefoxProfile.setPreference(“extensions.firebug.currentVersion”,“1.8.1”); //避开启动画面

WebDriver driver = new FirefoxDriver(firefoxProfile);

相关问题