我今天发生了一个问题 selenium.common.exceptions.WebDriverException:消息:chrome无法访问。我在python中使用selenum模块。谁能帮我。 我的源代码是:
#!/usr/bin/env python
# -*- coding:utf-8-*-
import os
from selenium import webdriver
import time
import sys
reload(sys)
import ssl
from selenium.webdriver.support.ui import Select
sys.setdefaultencoding("utf-8")
ssl._create_default_https_context = ssl._create_unverified_context
chrome_option=webdriver.ChromeOptions()
chromedriver='C:/Program Files (x86)/Google/Chrome/Application/chromedriver.exe'
extension='C:/Users/admin/Desktop/resource/checklist/apps/extensions/2.5.9_0.crx'
chrome_option.add_extension(extension)
chrome_option.add_argument('--user-data- dir=C:/Users/admin/AppData/Local/Google/Chrome/User Data/Default')
chrome_option.add_argument('user-agent=Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36')
browser=webdriver.Chrome(chrome_options=chrome_option,executable_path=chromedriver)
browser.get('chrome-extension://padekgcemlokbadohgkifijomclgjgif/options.html#!/profile/proxy')