Firefox profile sharing for remote Firefox web browser does not work

I am trying to start a remote webdriver instance of Firefox and pass to the profile.

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

this does not work. If I pass it to an instance of webdriver Firefox, it works fine

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

Is there a mistake? I am using Firefox 9 and Selenium 2.16

+4
source share
2 answers

So it was a bug with Selenium or Firefox that was fixed. The problem is that browser.download.folderList is an integer, so I changed it from 2 to int, and it works

+1
source

My call with Selenium 2.39.0 looks a little different than the higher. Note "browser_profile" as the key to call .Remote instead of the "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) 
0
source

Source: https://habr.com/ru/post/1389689/


All Articles