Fork me on GitHub


2.0.5 (2013-04-12)

  • Ignore select.error (not socket.error) following StopableWSGIServer.shutdown. [Laurence Rowe]
  • Handle the short form of <select multiple> [Marius Gedminas]

2.0.4 (2013-03-28)

  • Correctly handle <option> elements with no value attribute [Marius Gedminas]
  • Ignore socket.error following StopableWSGIServer.shutdown. [Laurence Rowe]
  • <button> without type=’submit’ attribute is treated as Submit control [Andrey Lebedev].
  • Support for redirects having relative “Location” header [Andrey Lebedev]

2.0.3 (2013-03-19)

  • Treat strings in the WSGI environment as native strings, compliant with PEP-3333. [wosc]

2.0.2 (2013-03-15)

  • Allow to match HTML content again. [ender672]
  • Support secure cookies [Andrey Lebedev]

2.0.1 (2013-03-05)

  • Added Pasword field [diarmuidbourke]
  • re-allow to use unknow field type. Like type="email". [gawel]
  • Don’t let BeautifulSoup use lxml. Fix GH-51 [kmike]
  • added webtest.response.TestResponse.maybe_follow() method [kmike]

2.0 (2013-02-25)

  • drop zc.buildout usage for development, now using only virtualenv [Domen Kožar]
  • Backward incompatibility : Removed the anchor argument of and the button argument of webtest.response.TestResponse.clickbutton(). It is for the greater good. [madjar]
  • Rewrote API documentation [Domen Kožar]
  • Added wsgiproxy support to do HTTP request to an URL [gawel]
  • Use BeautifulSoup4 to parse forms [gawel]
  • Added [gawel]
  • Implement support and kindof keep functionality. should be treated as read-only. [Domen Kožar]
  • Split Selenium integration into separate package webtest-selenium [gawel]
  • Split casperjs integration into separate package webtest-casperjs [gawel]
  • Test coverage improvements [harobed, cdevienne, arthru, Domen Kožar, gawel]
  • Fully implement decoding of HTML entities
  • Fix tox configuration


  • fix tests error due to CLRF in a tarball


  • add travis-ci
  • migrate repository to
  • Fix a typo in selectedIndicies
  • Preserve field order during parsing (support for deform and such)
  • allow equals sign in the cookie by spliting name-value-string pairs on the first ‘=’ sign as per
  • fix an error when you use AssertionError(response) with unicode chars in response


  • added webtest.ext - allow to use casperjs


  • fix #42 Check uppercase method.
  • fix #36 Radio can use forced value.
  • fix #24 Include test fixtures.
  • fix bug when trying to print a response which contain some unicode chars


  • fix #39 Add PATCH to acceptable methods.


  • fix #33 Remove CaptureStdout. Do nothing and break pdb
  • use OrderedDict to store fields in form. See #31
  • fix #38 Allow to post falsey values.
  • fix #37 Allow Content-Length: 0 without Content-Type
  • fix #30 bad link to pyquery documentation
  • Never catch NameError during iteration


  • added post_json, put_json, delete_json
  • fix #25 params dictionary of does not support unicode values


  • improve showbrowser. fixed #23
  • print_stderr fail with unicode string on python2


  • Added .option() #20
  • Fix #21
  • Full python3 compat


  • Moved TestApp to
  • Added selenium testing framework. See sel module.


  • Accept lists for, params=[...])
  • Allow to use url that starts with the SCRIPT_NAME found in extra_environ
  • Fix #16 Default content-type is now correctly set to application/octet-stream
  • Fix #14 and #18 Allow to use .delete(params={})
  • Fix #12


  • Fix #10, now TestApp.extra_environ doesn’t take precedence over a WSGI environment passed in through the request.
  • Removed stray print


  • Revert change to cookies that would add " around cookie values.
  • Added property webtest.Response.pyquery() which returns a PyQuery object.
  • Set base_url on resp.lxml
  • Include tests and docs in tarball.
  • Fix sending in webob.Request (or webtest.TestRequest) objects.
  • Fix handling forms with file uploads, when no file is selected.
  • Added extra_environ argument to
  • Fixed/added wildcard statuses, like status="4*"
  • Fix file upload fields in forms: allow upload field to be empty.
  • Added support for single-quoted html attributes.
  • TestResponse now has unicode support. It is turned on by default for all responses with charset information. This is backward incompatible change if you rely (e.g. in doctests) on parsed form fields or responses returned by json and lxml methods being encoded strings when charset header is in response. In order to switch to old behaviour pass use_unicode=False flag to TestApp constructor.


  • Added method TestApp.request(), which can be used for sending requests with different methods (e.g., MKCOL). This method sends all its keyword arguments to webtest.TestRequest.blank() and then executes the request. The parameters are somewhat different than other methods (like webtest.TestApp.get()), as they match WebOb’s attribute names exactly (the other methods were written before WebOb existed).
  • Removed the copying of stdout to stderr during requests.
  • Fix file upload fields in forms (#340) – you could upload files with, but if you use resp.form file upload fields would not work (from and Matthew Desmarais).


  • Fix form inputs; text inputs always default to the empty string, and unselected radio inputs default to nothing at all. From Daniele Paolella.
  • Fix following links with fragments (these fragments should not be sent to the WSGI application). From desmaj.
  • Added force_value to select fields, like res.form['select'].force_value("new_value"). This makes it possible to simulate forms that are dynamically updated. From Matthew Desmarais.
  • Fixed webtest.Response.mustcontain() when you pass in a no=[strings] argument.


  • Changed the __str__ of responses to make them more doctest friendly:
    • All headers are displayed capitalized, like Content-Type
    • Headers are sorted alphabetically
  • Changed __repr__ to only show the body length if the complete body is not shown (for short bodies the complete body is in the repr)
  • Note: these are backward incompatible changes if you are using doctest (you’ll have to update your doctests with the new format).
  • Fixed exception in the .delete method.
  • Added a content_type argument to and app.put, which sets the Content-Type of the request. This is more convenient when testing REST APIs.
  • Skip links in <script>...</script> tags (since that’s not real markup).


  • Don’t submit unnamed form fields.
  • Checkboxes with no explicit value send on (previously they sent checked, which isn’t what browsers send).
  • Support for <select multiple> fields (from Matthew Desmarais)

1.0.1 —

  • Fix the TestApp validator’s InputWrapper lacking support for readline with an argument as needed by the cgi module.


  • Keep URLs in-tact in cases such as app.get('') (so, etc).
  • Fix lxml.html import, so lxml 2.0 users can get HTML lxml objects from resp.lxml
  • Treat <input type="image"> like a submit button.
  • Use BaseCookie instead of SimpleCookie for storing cookies (avoids quoting cookie values).
  • Accept any params argument that has an items method (like MultiDict)


Initial release