Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion py/selenium/common/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

from typing import Optional
from typing import Sequence
import os

SUPPORT_MSG = "For documentation on this error, please visit:"
ERROR_URL = "https://www.selenium.dev/documentation/webdriver/troubleshooting/errors"
Expand All @@ -38,7 +39,7 @@ def __str__(self) -> str:
exception_msg = f"Message: {self.msg}\n"
if self.screen:
exception_msg += "Screenshot: available via screen\n"
if self.stacktrace:
if self.stacktrace and os.getenv("INCLUDE_STACKTRACE"):
Copy link
Author

@SmartManoj SmartManoj Dec 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if self.stacktrace and os.getenv("INCLUDE_STACKTRACE"):
if self.stacktrace and not os.getenv("EXCLUDE_STACKTRACE"):

Will this change be accepted?

stacktrace = "\n".join(self.stacktrace)
exception_msg += f"Stacktrace:\n{stacktrace}"
return exception_msg
Expand Down