From 072e8d6f08b1d9ebdb8dcbdd585bcff2a82fe358 Mon Sep 17 00:00:00 2001 From: Adolfo Armas Date: Thu, 5 Jun 2025 11:11:07 -0300 Subject: [PATCH] Update exceptions.py Update urls to the correct troubleshooting links: -https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/#nosuchelementexception -https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/#staleelementreferenceexception -https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/#invalidselectorexception --- py/selenium/common/exceptions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/py/selenium/common/exceptions.py b/py/selenium/common/exceptions.py index 6f10146b779d4..8382d22d8033e 100644 --- a/py/selenium/common/exceptions.py +++ b/py/selenium/common/exceptions.py @@ -75,7 +75,7 @@ class NoSuchElementException(WebDriverException): def __init__( self, msg: Optional[str] = None, screen: Optional[str] = None, stacktrace: Optional[Sequence[str]] = None ) -> None: - with_support = f"{msg}; {SUPPORT_MSG} {ERROR_URL}#no-such-element-exception" + with_support = f"{msg}; {SUPPORT_MSG} {ERROR_URL}#nosuchelementexception" super().__init__(with_support, screen, stacktrace) @@ -114,7 +114,7 @@ class StaleElementReferenceException(WebDriverException): def __init__( self, msg: Optional[str] = None, screen: Optional[str] = None, stacktrace: Optional[Sequence[str]] = None ) -> None: - with_support = f"{msg}; {SUPPORT_MSG} {ERROR_URL}#stale-element-reference-exception" + with_support = f"{msg}; {SUPPORT_MSG} {ERROR_URL}#staleelementreferenceexception" super().__init__(with_support, screen, stacktrace) @@ -213,7 +213,7 @@ class InvalidSelectorException(WebDriverException): def __init__( self, msg: Optional[str] = None, screen: Optional[str] = None, stacktrace: Optional[Sequence[str]] = None ) -> None: - with_support = f"{msg}; {SUPPORT_MSG} {ERROR_URL}#invalid-selector-exception" + with_support = f"{msg}; {SUPPORT_MSG} {ERROR_URL}#invalidselectorexception" super().__init__(with_support, screen, stacktrace)