我使用selenium webdriver创建了新的firefox配置文件,如web driver documentation中所示。我也创建了firebug扩展,但我无法访问firefox xpcom功能。有没有办法这样做?我在firefox控制台中收到错误。
NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "a is null" {file: "file:///C:/Users/RMDESI~1/AppData/Local/Temp/anonymous3659154916358123849webdriver-profile/extensions/fxdriver@googlecode.com/components/prompt_service.js" line: 7637}]'[JavaScript Error: "a is null" {file: "file:///C:/Users/RMDESI~1/AppData/Local/Temp/anonymous3659154916358123849webdriver-profile/extensions/fxdriver@googlecode.com/components/prompt_service.js" line: 7637}]' when calling method: [nsIPromptService::prompt]
答案 0 :(得分:0)
尝试使用以下代码:
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("security.xpconnect.plugin.unrestricted",true);