Selenium uses WebDriverWait to report errors

problem description

visual studio code + selenium + python, using WebDriverWait to report errors

the environmental background of the problems and what methods you have tried

chromedriver.exe has been downloaded from the official website. The version is 2.43 and the chrome version is 70.0 (64bit).

related codes

/ / Please paste the code text below (do not replace the code with pictures)
-sharp coding:utf-8

from selenium import webdriver
import time
from selenium.webdriver.support.wait import WebDriverWait

-sharp chrome
driver = webdriver.Chrome()
driver.get("https://cn.bing.com/")
-sharp 
-sharp time.sleep(4)
-sharp 
wait = WebDriverWait(driver, 10)
driver.quit()

what result do you expect? What is the error message actually seen?

after running, the corresponding web page can be opened normally, but the Terminal prompt

DevTools listening on ws://127.0.0.1:53739/devtools/browser/28b5cb84-9cd5-4c9c-aaad-5b44b0864b0c
[15408:9464:1112/180300.399:ERROR:shader_disk_cache.cc(257)] Failed to create shader cache entry: -2

replace the Chrome browser with FireFox, and download and configure geckodriver.exe (webdriver for FireFox browsers). This problem does not occur.


DevTools listening on ws://127.0.0.1:53739/devtools/browser/28b5cb84-9cd5-4c9c-aaad-5b44b0864b0c

could you tell me why there is listening on this port? Does it have any impact? I see a lot of people on the Internet are asking, but do not see the answer?


close the open background instance of Chrome, and specify the path of driver when initializing the Chrome instance.

Menu