Answer the question
In order to leave comments, you need to log in
Why might extensions not work in Mozilla Selenium profile?
Good afternoon, I'm working with python and selenium for the first time, I want to load a browser with a pre-prepared profile, but when loading, all extensions appear for a split second and disappear, but for example, the browser settings remain correct (from the profile), why can extensions disappear?
def open_Fire():
print("Открытие Firefox")
global spisok
print("список прокси - ", spisok)
ipport = spisok[0].split(":")
ip = ipport[0]
port = int(ipport[-1])
#profile = webdriver.FirefoxProfile()
profile = webdriver.FirefoxProfile('C:\\Users\\Sergey\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\bna45nie.default-release')
profile.set_preference("network.proxy.type", 1)
profile.set_preference("network.proxy.http", ip)
profile.set_preference("network.proxy.http_port", port)
profile.set_preference("network.proxy.ssl", ip)
profile.set_preference("network.proxy.ssl_port", port)
profile.set_preference("network.proxy.ftp", ip)
profile.set_preference("network.proxy.ftp_port", port)
profile.set_preference("network.proxy.socks", ip)
profile.set_preference("network.proxy.socks_port", port)
profile.update_preferences()
browser = webdriver.Firefox(firefox_profile=profile)
try:
browser.get('https://google.com')
Answer the question
In order to leave comments, you need to log in
Extensions must be loaded as xpi or zip file
profile.add_extension(extension="some_extension_name.xpi")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question