无法在geckodriver中更新firefox prefrenecs

时间:2017-03-02 13:00:13

标签: python selenium-webdriver geckodriver firefox-marionette

我正在使用geckodriver启动firefox版本51,并使用以下代码来设置首选项,但是当我看到操作时:在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)

0 个答案:

没有答案