将firefox配置文件传递给远程webdriver firefox实例不起作用 [英] Passing a firefox profile to remote webdriver firefox instance not working

查看:172
本文介绍了将firefox配置文件传递给远程webdriver firefox实例不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  profile = webdriver。

我试图启动Firefox的远程webdriver实例并传入配置文件。 FirefoxProfile()
profile.set_preference(browser.download.folderList,2)
self.webdriver = webdriver.Remote(desired_capabilities = webdriver.DesiredCapabilities.FIREFOX,browser_profile = profile)

这不起作用。如果我将它传递给Firefox webdriver实例,它可以正常工作

  profile = webdriver.FirefoxProfile()
profile.set_preference (browser.download.folderList,2)
self.webdriver = webdriver.Firefox(firefox_profile = profile)

是否有错误?我使用的是Firefox 9和Selenium 2.16


解决方案

因此,这可能是Selenium或Firefox已修复的错误。问题是browser.download.folderList是一个整数,所以我将它改为2,并且它工作


I'm trying to start up a remote webdriver instance of Firefox and pass in a profile.

profile = webdriver.FirefoxProfile()
profile.set_preference("browser.download.folderList","2")
self.webdriver = webdriver.Remote(desired_capabilities=webdriver.DesiredCapabilities.FIREFOX,browser_profile=profile)

this is not working. If I pass it into the Firefox webdriver instance it works fine

profile = webdriver.FirefoxProfile()
profile.set_preference("browser.download.folderList","2")
self.webdriver = webdriver.Firefox(firefox_profile=profile)

Is there a bug? I'm using Firefox 9 and Selenium 2.16

解决方案

So this was either a bug with Selenium or Firefox that has been fixed. Problem is that browser.download.folderList is an integer, so I changed it 2 to int and it works

这篇关于将firefox配置文件传递给远程webdriver firefox实例不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆