Exceptions¶
-
exception
ftw.testbrowser.exceptions.
AmbiguousFormFields
¶ Bases:
ftw.testbrowser.exceptions.BrowserException
Trying to change fields over multiple forms is not possible.
-
exception
ftw.testbrowser.exceptions.
BlankPage
(message='')¶ Bases:
ftw.testbrowser.exceptions.BrowserException
The browser is on a blank page.
-
exception
ftw.testbrowser.exceptions.
BrowserException
¶ Bases:
exceptions.Exception
ftw.testbrowser exception base class.
-
exception
ftw.testbrowser.exceptions.
BrowserNotSetUpException
¶ Bases:
ftw.testbrowser.exceptions.BrowserException
The browser is not set up properly. Use the browser as a context manager with the “with” statement.
-
exception
ftw.testbrowser.exceptions.
ContextNotFound
(message=None)¶ Bases:
ftw.testbrowser.exceptions.BrowserException
When trying to access a context but the current page has no context information, this exception is raised.
-
exception
ftw.testbrowser.exceptions.
FormFieldNotFound
(label_or_name, labels=None)¶ Bases:
ftw.testbrowser.exceptions.BrowserException
Could not find a form field.
-
exception
ftw.testbrowser.exceptions.
HTTPClientError
(status_code, status_reason)¶ Bases:
ftw.testbrowser.exceptions.HTTPError
The request caused a client error with status codes 400-499.
Variables: - status_code – The status code number, e.g.
404
- status_reason – The status reason, e.g.
"Not Found"
- status_code – The status code number, e.g.
-
exception
ftw.testbrowser.exceptions.
HTTPError
(status_code, status_reason)¶ Bases:
exceptions.IOError
The request has failed.
Variables: - status_code – The status code number
- status_reason – The status reason.
-
exception
ftw.testbrowser.exceptions.
HTTPServerError
(status_code, status_reason)¶ Bases:
ftw.testbrowser.exceptions.HTTPError
The request caused a server error with status codes 500-599.
Variables: - status_code – The status code number, e.g.
500
- status_reason – The status reason, e.g.
"Internal Server Error"
- status_code – The status code number, e.g.
-
exception
ftw.testbrowser.exceptions.
InsufficientPrivileges
(status_code, status_reason)¶ Bases:
ftw.testbrowser.exceptions.HTTPClientError
This exception is raised when Plone responds that the user has insufficient privileges for performing that request.
Plone redirects the user to a “require_login” script when the user has not enough privileges (causing an internal Unauthorized exception to be raised).
When a user is logged in, the “require_login” script will render a page with the title “Insufficient Privileges”. For anonymous users, the login form is rendered. Both cases cause the testbrowser to raise an InsufficientPrivileges exception.
This exception can be disabled with by disabling the
raise_http_errors
option.
-
exception
ftw.testbrowser.exceptions.
NoElementFound
(query_info=None)¶ Bases:
ftw.testbrowser.exceptions.BrowserException
Empty result set has no elements.
-
exception
ftw.testbrowser.exceptions.
NoWebDAVSupport
¶ Bases:
ftw.testbrowser.exceptions.BrowserException
The current testbrowser driver does not support webdav requests.
-
exception
ftw.testbrowser.exceptions.
OnlyOneValueAllowed
¶ Bases:
ftw.testbrowser.exceptions.BrowserException
The field or widget does not allow to set multiple values.
-
exception
ftw.testbrowser.exceptions.
OptionsNotFound
(field_label, options, labels=None)¶ Bases:
ftw.testbrowser.exceptions.BrowserException
Could not find the options for a widget.
-
exception
ftw.testbrowser.exceptions.
RedirectLoopException
(url)¶ Bases:
ftw.testbrowser.exceptions.BrowserException
The server returned a redirect response that would lead to an infinite redirect loop.
-
exception
ftw.testbrowser.exceptions.
ZServerRequired
¶ Bases:
ftw.testbrowser.exceptions.BrowserException
The requests driver can only be used with a running ZServer. Use the plone.app.testing.PLONE_ZSERVER testing layer.