MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / NoSuchElementException

Class NoSuchElementException

py/selenium/common/exceptions.py:68–86  ·  view source on GitHub ↗

Thrown when element could not be found. If you encounter this exception, you may want to check the following: * Check your selector used in your find_by... * Element may not yet be on the screen at the time of the find operation, (webpage is still loading) see selenium

Source from the content-addressed store, hash-verified

66
67
68class NoSuchElementException(WebDriverException):
69 """Thrown when element could not be found.
70
71 If you encounter this exception, you may want to check the following:
72 * Check your selector used in your find_by...
73 * Element may not yet be on the screen at the time of the find operation,
74 (webpage is still loading) see selenium.webdriver.support.wait.WebDriverWait()
75 for how to write a wait wrapper to wait for an element to appear.
76 """
77
78 def __init__(
79 self,
80 msg: Any | None = None,
81 screen: str | None = None,
82 stacktrace: Sequence[str] | None = None,
83 ) -> None:
84 with_support = f"{msg}; {SUPPORT_MSG} {ERROR_URL}#nosuchelementexception"
85
86 super().__init__(with_support, screen, stacktrace)
87
88
89class NoSuchAttributeException(WebDriverException):

Callers 8

find_elementMethod · 0.90
first_selected_optionMethod · 0.90
select_by_valueMethod · 0.90
select_by_indexMethod · 0.90
deselect_by_valueMethod · 0.90
deselect_by_indexMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected