获取错误:
Netscape.cfg/AutoConfig failed. Please contact your system administrator.
Error: defaultPref failed: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.setBoolPref]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: prefcalls.js :: defaultPref :: line 58" data: no]
Netscape.cfg/AutoConfig failed. Error: defaultPref failed: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED)
我有以下设置:
CentOs 6.4 上的硒网格
从节点 = CentOs 6.4
尝试通过 Watir-WebDriver 远程运行 Firefox
require "rubygems"
require "test/unit"
#require "selenium"
require "watir-webdriver"
caps = Selenium::WebDriver::Remote::Capabilities.firefox
#caps.version = "24"
caps[:name] = "Firefox 24 , port 5555"
default_profile = Selenium::WebDriver::Firefox::Profile.from_name "default"
default_profile.native_events = true
driver = Selenium::WebDriver.for(:firefox, :profile => default_profile)
@browser = Watir::Browser.new(
:remote,
:url => "http://vm-auto.his.vm:4444/wd/hub",
:desired_capabilities => caps)
@browser.goto "google.com"
@browser.text_field(:name => "q").set "3M"
@browser.button.click
@browser.div(:id => "resultStats").wait_until_present
@browser.screenshot.save ("GoogleSearch_FF24.png")
@browser.close
Firefox 版本是 Mozilla Firefox 24.7.0
在https://bugzilla.mozilla.org/show_bug.cgi?id=717438中有对这个错误的引用
建议的决议如下:
In my case commenting out this pref in mozilla.cfg stops generating this message.
But I do not know origin of this pref.
//stops the request to send performance data from displaying
//pref("toolkit.telemetry.prompted", true);
但是,我在安装 firefox 的文件系统上找不到 mozilla.cfg