Selenium-Exceptions
Selenium-Exceptions
A subclass of WebDriverException;
When trying to interact with an element
NotFoundException occurs when an element in the
that is not present in the DOM.
DOM does not exist.
Thrown when the server is not When the server fails to respond
RemoteDriverServerException responding due to improper because the capabilities described are
capabilities. not proper.
Occurs when capturing a When attempting to take a screenshot
ScreenshotException
screenshot is not possible. but the operation fails.
Raised when there is an alert, butWhen an alert is present, but WebDriver
UnhandledAlertException WebDriver is unable to perform thecannot handle it due to timing issues or
alert operation. other constraints.
When attempting to start a new
Thrown when a new session could
SessionNotCreatedException WebDriver session but the creation
not be created.
fails.
Occurs when the requested
When a command is sent to the server
command matches a known URL
UnknownMethodException that does not correspond to any known
but does not match any methods
method for the given URL.
for that URL.
Thrown when the frame or window
When attempting to switch to a frame
NoSuchShadowRootException target to be switched to does not
or window that does not exist.
exist.