6

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

Bob Evans
  • 616
  • 6
  • 18
  • 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. – Bob Evans Feb 09 '12 at 15:44

2 Answers2

2

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

Bob Evans
  • 616
  • 6
  • 18
0

My call with Selenium 2.39.0 looks a little different than what's above. Note "browser_profile" as the key for the .Remote call, instead of "firefox_profile" used above.

    profile = webdriver.FirefoxProfile()
    profile.accept_untrusted_certs = True

    executor = "https://" + \
        self.env.getSeleniumHub()['ip'] + \
        ":4444/wd/hub"

    capabilities = self.env.getSeleniumCapabilities("firefox")

    self.driver = webdriver.Remote(
        browser_profile=profile,
        desired_capabilities=capabilities,
        command_executor=executor)
    self.driver.implicitly_wait(10)
kiminoa
  • 2,649
  • 3
  • 16
  • 17