如何使用SeleniumWebDriver将FirefoxXPCOM加载到新创建的firefox配置文件

如何使用SeleniumWebDriver将FirefoxXPCOM加载到新创建的firefox配置文件,firefox,selenium-webdriver,firefox-addon,Firefox,Selenium Webdriver,Firefox Addon,我使用SeleniumWebDriver创建了新的firefox配置文件,如中所示。我也创建了firebug扩展,但当时我无法访问firefox xpcom功能。有没有办法做到这一点?我在firefox控制台中发现以下错误 NS\u ERROR\u XPC\u JAVASCRIPT\u ERROR\u WITH\u详细信息:[JAVASCRIPT ERROR:“a为空”{file:“file:///C:/Users/RMDESI~1/AppData/Local/Temp/anonymous365

我使用SeleniumWebDriver创建了新的firefox配置文件,如中所示。我也创建了firebug扩展,但当时我无法访问firefox xpcom功能。有没有办法做到这一点?我在firefox控制台中发现以下错误


NS\u ERROR\u XPC\u JAVASCRIPT\u ERROR\u WITH\u详细信息:[JAVASCRIPT ERROR:“a为空”{file:“file:///C:/Users/RMDESI~1/AppData/Local/Temp/anonymous3659154916358123849webdriver配置文件/扩展/fxdriver@googlecode.com/components/prompt_service.js“line:7637}]”[JavaScript错误:“a为空”{文件:"file:///C:/Users/RMDESI~1/AppData/Local/Temp/anonymous3659154916358123849webdriver配置文件/扩展/fxdriver@googlecode.com/组件/prompt_service.js“line:7637}]”调用方法时:[nsiproptservice::prompt]
请尝试以下代码:

FirefoxProfile profile = new FirefoxProfile(); 
profile.setPreference("security.xpconnect.plugin.unrestricted",true);