现在,get方法不适用于python中的硒驱动程序

时间:2019-05-11 13:45:14

标签: python google-chrome get webdriver selenium-chromedriver

我正在尝试使用Selenium chrome驱动程序打开URL。 运行正常。但是,突然我遇到了与chrome驱动程序版本有关的错误。

因此,我已经更新了干燥器,但是get方法现在可以正常工作了。

import os 
import pyautogui
import time
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import mysql.connector
import webbrowser
import sys

executable_path = r"Desktop\Chrome Driver\chromedriver.exe"
os.environ["webdriver.chrome.driver"] = executable_path

chrome_options = Options()
chrome_options.add_extension(r'Desktop\Chrome Driver\DS-Amazon-Quick-View_v2.6.15.crx')

driver = webdriver.Chrome(executable_path=executable_path, chrome_options=chrome_options)

driver.get('https://www.google.com')

driver.quit()

0 个答案:

没有答案