Python 正在尝试加载安装了扩展的chrome webdriver,
我正在尝试加载已安装扩展的chrome webdriver(按照“”中提到的步骤),但找不到已安装的扩展。请您帮助我,我正在尝试的代码是Python 正在尝试加载安装了扩展的chrome webdriver,,python,selenium,selenium-webdriver,Python,Selenium,Selenium Webdriver,我正在尝试加载已安装扩展的chrome webdriver(按照“”中提到的步骤),但找不到已安装的扩展。请您帮助我,我正在尝试的代码是 from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome_options = Options() chrome_options.add_extension('C:/Users/john/Desktop/john/v1.10.0.0.cr
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_extension('C:/Users/john/Desktop/john/v1.10.0.0.crx')
driver = webdriver.Chrome()
driver.get('https://www.google.co.in')
它只是启动并打开带有google页面的chrome webdriver,我正在尝试使用安装了扩展的浏览器打开。这是否可能使用selenium,有人能帮我打电话吗
driver = webdriver.Chrome(chrome_options=chrome_options)
而不仅仅是
driver = webdriver.Chrome()
我可以为您提供用java编写的代码,它运行良好
File file = new File("path_to_your_extension");
String path = file.getAbsolutePath();
ChromeOptions options = new ChromeOptions();
options.addExtensions(new File(path))
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.google.co.in")