我正在使用 geckodriver 启动 firefox 51 版,并使用以下代码设置首选项,但是当我看到 in action:config in firefox 时。首选项未更新
nodeAddress = 20.20.20.20 #Node addres where browser is getting launched
d = DesiredCapabilities.FIREFOX
d['loggingPrefs'] = {'browser': 'ALL'}
d['marionette'] = True
d['binary'] = 'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe'
f = webdriver.FirefoxProfile()
f.set_preference('media.navigator.permission.disabled', True)
d['firefox_profile']=f.encoded
driver = webdriver.Remote(command_executor=nodeAddress,desired_capabilities=f)
这个也试过
nodeAddress = 20.20.20.20 #Node addres where browser is getting launched
d = DesiredCapabilities.FIREFOX
d['loggingPrefs'] = {'browser': 'ALL'}
d['marionette'] = True
d['binary'] = 'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe'
f = webdriver.FirefoxProfile()
f.set_preference('media.navigator.permission.disabled', True)
driver = webdriver.Remote(command_executor=nodeAddress,desired_capabilities=f,browser_profile=f.encoded)