fix invalid session id after using get_in or context manager style

This commit is contained in:
unknown 2021-02-04 12:55:44 +01:00
parent 10b341b574
commit b3014260ce
2 changed files with 3 additions and 2 deletions

View File

@ -16,7 +16,7 @@ from setuptools import setup
setup(
name="undetected-chromedriver",
version="2.1.1",
version="2.1.2",
packages=["undetected_chromedriver"],
install_requires=["selenium",],
url="https://github.com/ultrafunkamsterdam/undetected-chromedriver",

View File

@ -292,7 +292,7 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
# threading.Timer(factor or self.factor, self.close).start()
time.sleep(delay or self.delay)
self.service.start()
# self.start_session()
self.start_session()
def quit(self):
try:
@ -323,6 +323,7 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
# threading.Timer(self.factor, self.service.start).start()
time.sleep(self.delay)
self.service.start()
self.start_session()
def __hash__(self):
return hash(self.options.debugger_address)