无法将foxyproxy插件添加到硒中

问题描述 投票:2回答:1

[尝试将FoxyProxy扩展名添加到Firefox驱动程序时:

from selenium.webdriver import FirefoxProfile, DesiredCapabilities
from selenium import webdriver

profile =FirefoxProfile()
firefox_capabilities = DesiredCapabilities.FIREFOX
firefox_capabilities['marionette'] = False
profile.add_extension(extension='res/[email protected]')
profile.set_preference("extensions.logging.enabled", True)
driver = webdriver.Firefox(profile,capabilities=firefox_capabilities)

一切似乎都很好,但是当窗口打开时,我看到未安装FoxyProxy,浏览器控制台也显示以下消息:

1566128038983   addons.xpi-utils    DEBUG   New add-on [email protected] installed in app-profile
Blocklist::loadBlocklist: blocklist is disabled
1566128039076   addons.xpi-utils    WARN    Add-on [email protected] is not correctly signed. 2
1566128039076   addons.xpi-utils    WARN    addMetadata: Add-on [email protected] is invalid: Error: Extension [email protected] is not correctly signed(resource://gre/modules/addons/XPIDatabase.jsm:2452:17) JS Stack trace: [email protected]:2452:17
[email protected]:2809:26
[email protected]:2728:55
[email protected]:2265:12
[email protected]:193:31
[email protected]:569:5
[email protected]:725:14
[email protected]:2797:26
[email protected]:65:29

这意味着扩展名未正确签名。购买了xpi文件,直接从我的常规个人资料扩展名文件夹中复制了该文件,所以我不明白为什么出现此警告?实际上这是安装失败的根源。

python selenium selenium-firefoxdriver foxyproxy
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.