I want to download the Firefox Addon RequestPolicy. Here is how I tried:
rp = open(wd + "/requestpolicy.xpi") firefoxProfile = FirefoxProfile() firefoxProfile.add_extension(rp) self.driver = webdriver.Firefox(firefoxProfile) self.usr = user.User(self.driver, username, password, world) self.usr.login()
There is no error, in accordance with the Documents , it should work, but this is not so, it still starts without an addon.
The next thing I tried is called like this:
self.driver = webdriver.Firefox(browser_profile=firefoxProfile)
Output:
TypeError: __init__() got an unexpected keyword argument 'browser_profile'
But this is an aspect of python that I don't know about. I got this idea because source looks like.
source share