Python Can';t使用Selenium更改Firefox的首选项

Python Can';t使用Selenium更改Firefox的首选项,python,selenium,selenium-webdriver,selenium-firefoxdriver,Python,Selenium,Selenium Webdriver,Selenium Firefoxdriver,我想使用Selenium打开具有特定首选项的Firefox配置文件。但是我不能更改首选项,它总是用默认的首选项加载页面 from selenium import webdriver from selenium.webdriver.firefox.firefox_profile import FirefoxProfile profiles = FirefoxProfile('Mozilla\\Firefox\\Profiles\\my.profile') profiles.set_prefere

我想使用Selenium打开具有特定首选项的Firefox配置文件。但是我不能更改首选项,它总是用默认的首选项加载页面

from selenium import webdriver
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile

profiles = FirefoxProfile('Mozilla\\Firefox\\Profiles\\my.profile')
profiles.set_preference("browser.link.open_newwindow", 3)
profiles.update_preferences()

browser = webdriver.Firefox(firefox_profile=profiles, executable_path='Drivers\\geckodriver.exe')

browser.get('https://www.google.com/search?q=Example')