selenium+headless加载插件代码
self.options.add_argument('--headless')
# 加载插件
self.options.add_extension(r"G:\插件\SwitchyOmega_Chromium.crx")
报错
selenium.common.exceptions.WebDriverException: Message: unknown error: failed to wait for extension background page to load: chrome-extension://padekgcemlokbadohgkifijomclgjgif/background.html
from unknown error: page could not be found: chrome-extension://padekgcemlokbadohgkifijomclgjgif/background.html
(Driver info: chromedriver=2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 6.1.7601 SP1 x86_64)
原因:selenium无法加载自定义插件无法访问谷歌设置等页面