Refs #27079 -- Used addClassCleanup() in SeleniumTestCase.
Regression in def09bf4126d4886413adf7388882eca8e32576b.
This commit is contained in:
parent
3f1bc2222f
commit
d6e9ec4014
@ -115,15 +115,15 @@ class SeleniumTestCase(LiveServerTestCase, metaclass=SeleniumTestCaseBase):
|
|||||||
cls.selenium = cls.create_webdriver()
|
cls.selenium = cls.create_webdriver()
|
||||||
cls.selenium.implicitly_wait(cls.implicit_wait)
|
cls.selenium.implicitly_wait(cls.implicit_wait)
|
||||||
super().setUpClass()
|
super().setUpClass()
|
||||||
|
cls.addClassCleanup(cls._quit_selenium)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _tearDownClassInternal(cls):
|
def _quit_selenium(cls):
|
||||||
# quit() the WebDriver before attempting to terminate and join the
|
# quit() the WebDriver before attempting to terminate and join the
|
||||||
# single-threaded LiveServerThread to avoid a dead lock if the browser
|
# single-threaded LiveServerThread to avoid a dead lock if the browser
|
||||||
# kept a connection alive.
|
# kept a connection alive.
|
||||||
if hasattr(cls, "selenium"):
|
if hasattr(cls, "selenium"):
|
||||||
cls.selenium.quit()
|
cls.selenium.quit()
|
||||||
super()._tearDownClassInternal()
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def disable_implicit_wait(self):
|
def disable_implicit_wait(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user