我找到下面文章 , 但還是無法解決
https://kknews.cc/zh-tw/code/3bqpyyy.html
from selenium import webdriver
optons=webdriver.ChromeOptions()
optons.add_argument('disable-infobars')
driver=webdriver.Chrome(chrome_options=optons)
driver.maximize_window()
driver.get
driver = webdriver.Chrome("D:\python\chromedriver.exe")
drvier.get("http://www.google.com")
dlement=driver.find_element_by_class_name("gLFyf.gsfi")
element.send_keys("Selenium Python")
D:\python>[11632:12292:0427/225437.236:ERROR:device_event_log_impl.cc(214)] [22:54:37.236] USB: usb_device_handle_win.cc:1054 Failed to read descriptor from node connection: 連結到系統的某個裝置失去作用。 (0x1F)
[11632:12292:0427/225437.296:ERROR:device_event_log_impl.cc(214)] [22:54:37.297] USB: usb_device_handle_win.cc:1054 Failed to read descriptor from node connection: 連結到系統的某個裝置失去作用。 (0x1F)
[11632:12292:0427/225437.299:ERROR:device_event_log_impl.cc(214)] [22:54:37.299] USB: usb_device_handle_win.cc:1054 Failed to read descriptor from node connection: 連結到系統的某個裝置失去作用。 (0x1F)
[16120:9008:0427/225631.057:ERROR:gpu_init.cc(426)] Passthrough is not supported, GL is disabled
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
options.add_experimental_option("prefs", {"profile.password_manager_enabled": False, "credentials_enable_service": False})
driver=webdriver.Chrome(chrome_options=options)
driver.maximize_window()
driver.get("http://www.google.com")
謝謝回答 , 怎麼沒有出現輸入 Selenium Python
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
options.add_experimental_option("prefs", {"profile.password_manager_enabled": False, "credentials_enable_service": False})
driver=webdriver.Chrome(chrome_options=options)
driver.maximize_window()
driver.get("http://www.google.com")
dlement=driver.find_element_by_class_name("gLFyf.gsfi")
element.send_keys("Selenium Python")
因為你的路徑跟我不一樣