urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection …>: Failed to establish a new connection: [Errno 111] Connection refused
问题 Why does one see this error in Selenium; urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0xsome_hex_address>: Failed to establish a new connection: [Errno 111] Connection refused When using various functions? 回答1: Please ensure you have not somewhere terminated your session. For example (in Python); import time from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By driver = webdriver