Exceptions

class splinter.exceptions.DriverNotFoundError

Exception raised when a driver is not found.

Example:

>>> from splinter import Browser
>>> b = Browser('unknown driver') # raises DriverNotFoundError
class splinter.exceptions.ElementDoesNotExist

Exception raised when an element is not found in the page.

The exception is raised only when someone tries to access the element, not when the driver is finding it.

Example:

>>> elements = browser.find_by_id('unknown-id') # returns an empty list
>>> elements[0] # raises ElementDoesNotExist
class splinter.request_handler.status_code.HttpResponseError(code, reason)

Represents an HTTP response error.

msg = None

A message for the error (example: “404 - Not found”)

reason = None

Reason of the fail (example: “Not found”)

status_code = None

Number representing the error (example: 404)