urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=‘127.0.0.1’, port=10487): Max retries exceeded with url: /session/b3087861a05cbfa4b2405964d128fcca/window/maximize (Caused by NewConnectionErr
这个问题出现,引起报错的原因是代码中出现quit()
找到注释就可以了
def get_url(self, url):
if self.driver is not None:
self.driver.maximize_window()
if 'http://' in url:
self.driver.get(url)
else:
print("你的网站格式不对")
else:
print("case失败")
# self.driver.quit()