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

Class InvalidSelectorException

py/selenium/common/exceptions.py:224–238  ·  view source on GitHub ↗

Thrown when the selector used to find an element does not return a WebElement. Currently this only happens when the XPath expression is syntactically invalid or does not select WebElements.

Source from the content-addressed store, hash-verified

222
223
224class InvalidSelectorException(WebDriverException):
225 """Thrown when the selector used to find an element does not return a WebElement.
226
227 Currently this only happens when the XPath expression is syntactically invalid or does not select WebElements.
228 """
229
230 def __init__(
231 self,
232 msg: Any | None = None,
233 screen: str | None = None,
234 stacktrace: Sequence[str] | None = None,
235 ) -> None:
236 with_support = f"{msg}; {SUPPORT_MSG} {ERROR_URL}#invalidselectorexception"
237
238 super().__init__(with_support, screen, stacktrace)
239
240
241class ImeNotAvailableException(WebDriverException):

Callers 3

find_elementMethod · 0.90
find_elementsMethod · 0.90
convertMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected