-
|
Hi, i have a question about the exceptions. if i wanna raise an sys.exit(-1) i cant get the log of the error, how i can access to the logs to print them in the console? My current code: The Ouput: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Follow the model for using a custom class BaseTestCase(BaseCase):
def tearDown(self):
self.save_teardown_screenshot() # If test fails, or if "--screenshot"
if self.has_exception():
# <<< Run custom code if the test failed. >>>
pass
else:
# <<< Run custom code if the test passed. >>>
pass
# (Wrap unreliable tearDown() code in a try/except block.)
# <<< Run custom tearDown() code BEFORE the super().tearDown() >>>
super().tearDown()Inside the |
Beta Was this translation helpful? Give feedback.
Follow the model for using a custom
tearDown()in tests: https://github.com/seleniumbase/SeleniumBase/blob/master/examples/boilerplates/base_test_case.pyInside the
super().tearDown()section, the …