1

Selenium + Firefox + extensions used to work earlier today. But I updated FF and selenium did not work anymore (see here) so I had to switch to geckodriver.

I want to run selenium (gecko driver) + udrive extension + quickjava extension, like I did before FF update.

I have the following code :

firefox_capabilities = DesiredCapabilities.FIREFOX
firefox_capabilities['marionette'] = True
firefox_capabilities['binary'] = '/usr/bin/firefox'
global browser
profile = webdriver.FirefoxProfile()
profile.add_extension("IN/quickjava-2.0.6-fx.xpi")
profile.add_extension("IN/ublock184.xpi")
profile.set_preference("thatoneguydotnet.QuickJava.curVersion", "2.0.6.1") ## Prevents loading the 'thank you for installing screen'
profile.set_preference("thatoneguydotnet.QuickJava.startupStatus.Images", 2)  ## Turns images off
profile.set_preference("thatoneguydotnet.QuickJava.startupStatus.AnimatedImage", 2)  ## Turns animated images off
browser = webdriver.Firefox(capabilities=firefox_capabilities, firefox_profile=profile)

However Firefox starts and runs without any of the extensions... Why ?

Community
  • 1
  • 1
Vincent
  • 1,534
  • 3
  • 20
  • 42
  • Just try once by creating one new firefox profile, add extension in that profile and use that profile, for creating new firefox profile, you can follow the step I have mentioned in this post-http://stackoverflow.com/questions/40878504/how-to-use-acceptsslcerts-with-remotewebdriver/40881502#40881502 – Shoaib Akhtar Nov 30 '16 at 06:25

1 Answers1

0

Made it work with :

firefox_capabilities['firefox_profile'] = profile.encoded
browser = webdriver.Firefox(capabilities=firefox_capabilities)
Vincent
  • 1,534
  • 3
  • 20
  • 42