Chrome+selenium+headless報錯無法加載插件

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無法加載自定義插件無法訪問谷歌設置等頁面

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章