How to modify allure trace in pytest #2272
Answered
by
delatrie
lozik4
asked this question in
Questions & Support
-
Beta Was this translation helpful? Give feedback.
Answered by
delatrie
Jan 5, 2024
Replies: 1 comment 1 reply
-
The original exception (which still has the raise WebDriverException(msg=msg, stacktrace=stacktrace) from None Clearing the try:
...
except Exception as e:
e.stacktrace = None
raise |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lozik4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The original exception (which still has the
stacktrace
) is reported due to the exception chaining feature of Python 3. Use the following syntax to suppress the chaining explicitly:Clearing the
stacktrace
of the original exception should work too since it's just a custom attribute managed by Selenium during exception formatting: