Exceptions
This section documents all custom exceptions that can be raised by Pydoll operations.
pydoll.exceptions
Pydoll Exception Classes
This module contains all exception classes used throughout the Pydoll library, organized into logical categories based on their function and usage patterns. Each category uses a base class to provide common functionality for related exceptions.
PydollException
ConnectionException
Bases: PydollException
Base class for exceptions related to browser connection.
ConnectionFailed
Bases: ConnectionException
Raised when connection to the browser cannot be established.
ReconnectionFailed
Bases: ConnectionException
Raised when an attempt to reconnect to the browser fails.
WebSocketConnectionClosed
Bases: ConnectionException
Raised when the WebSocket connection to the browser is closed unexpectedly.
NetworkError
Bases: ConnectionException
Raised when a general network error occurs during browser communication.
BrowserException
Bases: PydollException
Base class for exceptions related to browser process management.
BrowserNotRunning
Bases: BrowserException
Raised when attempting to interact with a browser that is not running.
FailedToStartBrowser
Bases: BrowserException
Raised when the browser process cannot be started.
UnsupportedOS
Bases: BrowserException
Raised when attempting to run on an unsupported operating system.
NoValidTabFound
Bases: BrowserException
Raised when no valid browser tab can be found or created.
ProtocolException
Bases: PydollException
Base class for exceptions related to CDP protocol communication.
InvalidCommand
Bases: ProtocolException
Raised when an invalid command is sent to the browser.
InvalidResponse
Bases: ProtocolException
Raised when an invalid response is received from the browser.
ResendCommandFailed
Bases: ProtocolException
Raised when an attempt to resend a failed command fails.
CommandExecutionTimeout
Bases: ProtocolException
Raised when a command execution times out.
InvalidCallback
Bases: ProtocolException
Raised when an invalid callback is provided for an event.
EventNotSupported
Bases: ProtocolException
Raised when an attempt is made to subscribe to an unsupported event.
ElementException
Bases: PydollException
Base class for exceptions related to element interactions.
ElementNotFound
Bases: ElementException
Raised when an element cannot be found in the DOM.
ElementNotVisible
Bases: ElementException
Raised when attempting to interact with an element that is not visible.
ElementNotInteractable
Bases: ElementException
Raised when attempting to interact with an element that cannot receive interaction.
ClickIntercepted
Bases: ElementException
Raised when a click operation is intercepted by another element.
ElementNotAFileInput
Bases: ElementException
Raised when attempting to use file input methods on a non-file input element.
TimeoutException
Bases: PydollException
Base class for exceptions related to timeouts.
PageLoadTimeout
Bases: TimeoutException
Raised when a page load operation times out.
WaitElementTimeout
Bases: TimeoutException
Raised when waiting for an element times out.
ConfigurationException
Bases: PydollException
Base class for exceptions related to configuration and options.
InvalidOptionsObject
Bases: ConfigurationException
Raised when an invalid options object is provided.
InvalidBrowserPath
Bases: ConfigurationException
Raised when an invalid browser executable path is provided.
ArgumentAlreadyExistsInOptions
Bases: ConfigurationException
Raised when attempting to add a duplicate argument to browser options.
InvalidFileExtension
Bases: ConfigurationException
Raised when an unsupported file extension is provided.
DialogException
Bases: PydollException
Base class for exceptions related to browser dialogs.
NoDialogPresent
Bases: DialogException
Raised when attempting to interact with a dialog that doesn't exist.
NotAnIFrame
Bases: PydollException
Raised when an element is not an iframe.
InvalidIFrame
Bases: PydollException
Raised when an iframe is not valid.
IFrameNotFound
Bases: PydollException
Raised when an iframe is not found.
NetworkEventsNotEnabled
Bases: PydollException
Raised when network events are not enabled.
ScriptException
Bases: PydollException
Base class for exceptions related to JavaScript execution.
InvalidScriptWithElement
Bases: ScriptException
Raised when a script contains 'argument' but no element is provided.