Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

A test browser for Zope and Plone.

Project description


Package documentation

ftw.testbrowser is a browser library for testing Plone web sites and applications. It integrations directly into Plone / Zope and uses lxml for parsing and querying pages. It supports all the basic features such as filling forms.


1.12.1 (2014-05-29)

  • Fix error in z3cform choice collection widget when using paths. [jone]

1.12.0 (2014-05-29)

  • Add a z3cform choice collection widget. This is used for z3cform List fields with Choice value_type. [jone]
  • Add select field node wrapper with methods for getting available options. [jone]

1.11.4 (2014-05-22)

  • support multiple values for the same data name. The values can either be passed as a dict with lists as values or as a sequence of two-element tuples. [jone]

1.11.3 (2014-05-19)

  • Fix browser.url regression when the previous request raised an exception. [jone]

1.11.2 (2014-05-17)

  • Make NoElementFound exception message more verbose. When a .first on an empty result set raises a NoElementFound exception, the exception message now includes the original query. [jone]

1.11.1 (2014-05-17)

  • Fix browser cloning regression in autocomplete widget “query”. The cloned browser did no longer have the same headers / cookies, causing authenticated access to be no longer possible. [jone]
  • New browser.clone method for creating browser clones. [jone]
  • Update standard page objects to accept browser instace as keyword arguments. This makes it possible to use the page objects with non-standard browsers. [jone]

1.11.0 (2014-05-14)

  • New browser.base_url property, respecting the <base> tag. [jone]

  • New browser.debug method, opening the current page in your real browser. [jone]

  • New browser.on method, a lazy variant of [jone]

  • New browser.reload method, reloading the current page. [jone]

  • Improve requests library support:

    • Support choosing requests library, make Zope app setup optional. When no Zope app is set up, the requests library is set as default, otherwise mechanize.
    • Support form submitting with requests library.
    • Improve login and header support for equests library requests.
    • Add browser.cookies support for requests library requests.
    • Use requests library sessions, so that cookies and headers persist.
    • Automatically use “POST” when data is submitted.


  • Login improvements:

    • Support passing member objects to browser.login(). The users / members are still expected to hav TEST_USER_PASSWORD as password.
    • Refactor login to use the new request header methods.


  • Add request header methods for managing permanent request headers:

    • browser.append_request_header
    • browser.replace_request_header
    • browser.clear_request_header


  • Refactor Form: eliminate class methods and do not use the global browser. This improves form support when running multiple browser instances concurrently.

    • Form.field_labels (class method) is now a instance property and public API.
    • Form.find_widget_in_form (class method) is removed and replaced with Form.find_widget (instance method).
    • Form.find_field_in_form (class method) is removed and replaced Form.get_field (instance method).
    • Form.find_form_element_by_label_or_name (class method) is removed and replaced with browser.find_form_by_field.
    • Form.find_form_by_labels_or_names (class method) is removed and replaced with browser.find_form_by_fields.
    • New Form.action_url property with the full qualified action URL.
    • Fix form action URL bug when using relative paths in combination with document-style base url.


  • Fix wrapping input.label - this did only work for a part of field types. [jone]

  • Fix UnicodeDecodeError in node string representation. [mathias.leimgruber]

1.10.0 (2014-03-19)

  • Add NodeWrapper-properties:

    • innerHTML
    • normalized_innerHTML
    • outerHTML
    • normalized_outerHTML

    [jone, elioschmutz]

1.9.0 (2014-03-18)

  • Add support for filling AT MultiSelectionWidget. [jone]

1.8.0 (2014-03-04)

  • Add a context property to the browser with the current context (Plone object) of the currently viewed page. [jone]

1.7.3 (2014-02-28)

  • Fix encoding problem in factories menu page object. The problem occured when having a “Restrictions…” entry in the menu. [jone]

1.7.2 (2014-02-25)

  • Form: Support checking checkboxes without a value. Checkboxes without a value attribute are invalid but common. The default browser behavior is to fallback to the value “on”. [jone]

1.7.0 (2014-02-03)

  • ContentTreeWidget: support filling objects as values. [jone]

1.6.1 (2014-01-31)

  • Implement logout on browser, logout before each login. [jone]

1.6.0 (2014-01-29)

  • Add cookies property to the browser. [jone]

1.5.3 (2014-01-28)

  • Fix multiple wrapping on browser.forms. [jone]

1.5.2 (2014-01-17)

  • Implement archetypes datetime widget form filling. [jone]

1.5.1 (2014-01-07)

  • Fix encoding problems when posting unicode data directly with [jone]
  • Support form filling with bytestrings. [jone]
  • Fix form filling with umlauts. [jone]
  • Fix form fill for single select fields. [jone]

1.5.0 (2014-01-03)

  • Implement AT file upload widget, because the label does not work. [jone]
  • Implement file uploads. [jone]
  • Add “headers” property on the browser. [jone]

1.4.0 (2013-12-27)

  • Deprecate normalized_text method, replace it with text property. The text property is more intuitive and easier to remember. The text property has almost the same result as normalized_text, but it represents <br/> and <p> with single and double newlines respectively. text is to be the lxml text property, which contained the raw, non-recursive text of the current node and is now available as raw_text property. [jone]
  • open_html: make debugging file contain passed HTML. [jone]
  • Sequence widget: implement custom form filling with label support and validation. [jone]
  • Sequence widget: add additional properties with inputs and options. [jone]

1.3.0 (2013-12-11)

  • Implement “query” method on autocomplete widget. [jone]
  • Implement form fill for z3cform datetime widget. [jone]
  • Fix setting attributes on nodes when wrapped with NodeWrapper. [jone]
  • Implement form fill for z3cform autocomplete widgets. [jone]
  • Implement form fill for z3cform sequence widgets. [jone]
  • Add webdav method for doing WebDAV requests with a ZServer. [jone]

1.2.0 (2013-11-24)

  • Add open_html method to browser object, allowing to pass in HTML directly. [jone]

1.1.0 (2013-11-07)

  • Add dexterity page object, refactor z3cform page object. [jone]
  • Add table nodes with helpers for table testing. [jone]
  • Merging “Nodes” lists returns a new “Nodes” list, not a “list”. [jone]
  • Show containing elements in string representation of “Nodes” list. [jone]
  • Fix direct child selection with CSS (node.css(“>tag”)). [jone]
  • Add a recursive option to normalized_text. [jone]

1.0.2 (2013-10-31)

  • When normalizing whitespaces, do also replace non-breaking spaces. [jone]

1.0.1 (2013-10-31)

  • Add first_or_none property to Nodes. [jone]

1.0.0 (2013-10-28)

  • Initial implementation. [jone]

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date (99.8 kB) Copy SHA256 hash SHA256 Source None May 29, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page