e2e: print screenshot filename after test
This commit is contained in:
parent
7ac4242a38
commit
52f66717d3
|
@ -58,9 +58,9 @@ class SeleniumTestCase(StaticLiveServerTestCase):
|
||||||
)
|
)
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
self.driver.save_screenshot(
|
screenshot_file = f"selenium_screenshots/{self.__class__.__name__}_{time()}.png"
|
||||||
f"selenium_screenshots/{self.__class__.__name__}_{time()}.png"
|
self.driver.save_screenshot(screenshot_file)
|
||||||
)
|
self.logger.warning("Saved screenshot", file=screenshot_file)
|
||||||
for line in self.driver.get_log("browser"):
|
for line in self.driver.get_log("browser"):
|
||||||
self.logger.warning(
|
self.logger.warning(
|
||||||
line["message"], source=line["source"], level=line["level"]
|
line["message"], source=line["source"], level=line["level"]
|
||||||
|
|
Reference in New Issue