```
from selenium import webdriver
#注意Chrome里的驅動位置要填寫全"C:\Program Files (x86)\Google\Chrome\Application\chrome_proxy.exe"
driver = webdriver.Chrome(**********)
driver.get("https://www.baidu.com")
```
報錯提示:selenium.common.exceptions.WebDriverException: Message: Service unexpectedly exited. Status code was: 0
我查了一些博客:
1.有說是要把 ****換成本地路徑的,我換了還是報錯
2.有說是環境變數設定錯誤,我也檢查了
3.有說吧驅動直接拖拉到作業目錄,我也試過了,還是報錯
uj5u.com熱心網友回復:
但是能打開瀏覽器,這是讓我做郁悶的,但是也僅僅只能打開瀏覽器了。因為當我添加后續代碼,如
```
input = driver.find_element_by_css_selector('#kw')
input.send_keys("恐龍快打")
button = driver.find_element_by_css_selector('#su')
button.click()
```
后,還是只打開瀏覽器,然后報錯,沒有后續反應
uj5u.com熱心網友回復:
求一個大神解答轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/239776.html
標籤:一般軟件使用
