我正在尝试在python硒代码中加载firefox插件。 但是我遇到以下错误。如何解决此问题
Selenium version : 3.13.0
python : 3.6
firefox version : 61.0.1
代码
firefoxProfile = webdriver.FirefoxProfile()
firefoxProfile.add_extension(extension = "firefoxbinary/ublock1.16.14.xpi")
driver = webdriver.Firefox(firefox_profile=firefoxProfile,executable_path="geckodriver")
driver.get('http://amazon.com/')
print(driver.page_source)
错误:
raise AddonFormatError(str(e), sys.exc_info()[2])
selenium.webdriver.firefox.firefox_profile.AddonFormatError: ("[Errno 2] No such file or directory: '/var/folders/f7/cw_7hbmn67q_db74544p0x3srxlj8y/T/tmp08r3_4os.ublock1.16.14.xpi/install.rdf'", <traceback object at 0x10332b248>)
我正在关注http://selenium-python.readthedocs.io/faq.html
更新:存在持续的问题https://github.com/SeleniumHQ/selenium/pull/5069
谢谢