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_reasoon – The status reason, e.g. "Not Found"
exception ftw.testbrowser.exceptions.HTTPError(status_code, status_reason)

Bases: exceptions.IOError

The request has failed.

Variables:
  • status_code – The status code number
  • status_reasoon – 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_reasoon – The status reason, e.g. "Internal Server Error"
exception ftw.testbrowser.exceptions.NoElementFound(query_info=None)

Bases: ftw.testbrowser.exceptions.BrowserException

Empty result set has no elements.

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.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.