NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #3897 most downloaded on PyPI
Helper to test WSGI applications
Last release 12 months ago
06 Oct 2025
Ships unpredictably
gaps range from 2 weeks to 3.0 years
Nearly every release is documented
notes for 59 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
19 years old
62 releases · first in 2007
Response.html is now a cached property to improve form parsing performance
Response.html is now a cached property to improve form parsing performance
Fix a bug that inputs outside of a tag were considered belonging to that form because they had a HTML representation identical to some input inside th
Fix a bug that inputs outside of a <form> tag were considered belonging to that form because they had a HTML representation identical to some input inside that <form>.
One column per quarter.
Detect form fields outside of tag associated via HTML5 form attribute.
Strip <option> text.
Detect form fields outside of <form> tag associated via HTML5 form attribute.
Ensure BeautifulSoup 4.13+ compatibility
Ensure BeautifulSoup 4.13+ compatibility
Minor release to fix metadata on pypi
Minor release to fix metadata on pypi
Bump waitress min version to 3.0.2
Bump waitress min version to 3.0.2
Drop support for Python 3.8 and bellow
Multiple file input support.
Drop support for Python 3.8 and bellow
Allows the TestResponse to follow customised onclick buttons
Response.pyquery object now use the html parser.
You can use the Response.PyQuery method to customize pyquery init.
Various docs / testing improvments
Rename "master" git branch to "main".
Dropped support for Python 2.7 and 3.5.
Dropped support for Python 2.7 and 3.5.
Added support for Python 3.9.
Clean up dependencies and requirements.
Switch from Travis to GitHub Actions for building and testing.
Prevent PytestCollectionWarning for TestApp
Remove use of deprecated splittype and splithost
python3.8 compat
Remove use of deprecated splittype and splithost
Fix the test length == 0 in check_content_type.
Fix the test length == 0 in check_content_type.
Treat <input type="search"> like <input type="text">.
Handle query parameters for the head method.
Fixed #196. Fix deprecation warnings for collections to use collections.abc for Iterable on Python 3.
Fixed #210. Allow to reset select multiple with field.value = []
Support for PYTHONOPTIMIZE=2, fix tests on PYTHONOPTIMIZE=1, 2
Fixed #196. Fix deprecation warnings for collections to use collections.abc for Iterable on Python 3.
remove invalid email from setup.py
remove invalid email from setup.py
Add Email class for input fields with type "email".
Add Email class for input fields with type "email".
Documentation bearer token and JWT authorization
Bugfix: Preserve submit order for radio inputs.
Bugfix: Preserve submit order for radio inputs.
Fixed #186: avoid UnicodeDecodeError in linter with py2 when a header contain non ascii chars
Fixed #185: Fix strict cookie policy
Fixed #185: Fix strict cookie policy
Fixed #146: Improve fields value checking when enctype is multipart
Fixed #119: Assertion error should be raised when you have non-string response header
Bugfix: Allow to set an int value to form fields when enctype is multipart
Added py36 to tox.ini / .travis.yaml
Bugfix: Allow to use set_cookie when HTTP_HOST is set
Bugfix: Allow to use set_cookie when HTTP_HOST is set
Fix #177: resp.json now always decode body as utf8
Always show response body when response status is invalid
Added JWT auth support
Always show response body when response status is invalid
Fix #173: Do not omit file uploads without a file from post. [Michael Howitz]
Fix #173: Do not omit file uploads without a file from post. [Michael Howitz]
Drop python 2.6 support. Newer versions may still work if you use waitress < 1.0
Drop python 2.6 support. Newer versions may still work if you use waitress < 1.0
Remove bs4 warnings
Docs improvments
Tets are WebOb 1.7.x compatible
- Create universal wheels.
Create universal wheels.
Fix #160: Do not guess encoding if response's charset is set.
Fix #160: Do not guess encoding if response's charset is set.
PR #147,#148 Take care of REFERER when using form.submit(), .click() and .clickbutton()
PR #154 Allow Bearer auth
PR #147,#148 Take care of REFERER when using form.submit(), .click() and .clickbutton()
PR #145 Allow to override content-type when using json methods
nothing new release. just try to make wheel available on pypi
nothing new release. just try to make wheel available on pypi
fixed #131 prevent passing HTML parameters that conflict with Field kwargs
fixed #131 prevent passing HTML parameters that conflict with Field kwargs
fixed #135 Document that WSGIProxy2 is required for "using webtest with a real url"
fixed #136 reset values of select multiple
drop py32 support (still work but test dependencies fail)
Avoid deprecation warning with py3.4
Avoid deprecation warning with py3.4
Properly check for default cookiejar arguments [Julian Berman]
Properly check for default cookiejar arguments [Julian Berman]
Avoid raising encoding errors from debugapp (needed to use with WSGIProxy2) [Laurence Rowe]
Fixed #110. Forced values for Radio inputs are no longer ignored by value property on get. [bayprogrammer]
Fixed #110. Forced values for Radio inputs are no longer ignored by value property on get. [bayprogrammer]
Added method TestApp.set_parser_features to change the parser_features used by BeautifulSoup. [tomasmoreyra]
Added app.set_cookie [luhn]
Fixed #108 cgi.parse_qsl is pending deprecation [gawel]
Fixed #73. Python < 2.6.5 does not support unicode as keyword arguments names. [Stepan Kolesnik]
Fixed #84 Application cookies for localhost are no longer ignored [gawel]
Fixed #89 remove WSGIWarning: You are not supposed to send a body in a DELETE request because we now have a good reason for that. See https://stackoverflow.com/questions/299628/is-an-entity-body-allowed-for-an-http-delete-request/299701#299701 [gawel]
Fixed #92 You can now override TestApp.JSONEncoder to use a custom encoder [gawel]
Fixed #93 Support basic authentication [gawel]
Fixed #103 Broken "Edit me on GitHub" links in documentation [gawel]
Fixed #106 Make wrapping the app in the lint middleware optional [dmlayton]
Fixed #107 Explicit error message when WSGIProxy2 is not installer [gawel]
Fixed #108 cgi.parse_qsl is pending deprecation [gawel]
Allow .select() on s and s. [Markus Bertheau]
Allow .select() on <select>s and <select multiple>s. [Markus Bertheau]
Allow selecting options by text [Markus Bertheau]
Allow selecting <select> options by text [Markus Bertheau]
Ignore the value attribute of file inputs [Markus Bertheau]
Ignore the value attribute of file inputs [Markus Bertheau]
Allow selecting the form submit button by its value [Markus Bertheau]
Depend on unittest2 only for Python versions lower than 2.7 [iElectric]
Depend on unittest2 only for Python versions lower than 2.7 [iElectric]
Add an optional parameter to TestApp, allowing the user to specify the parser used by BeautifulSoup [lyndsysimon]
Make StopableWSGIServer thread daemonic [lrowe]
Make StopableWSGIServer thread daemonic [lrowe]
Make sure Upload.content_type is not ignored https://github.com/Pylons/webtest/pull/88 [Marius Gedminas]
Make sure Upload.content_type is not ignored https://github.com/Pylons/webtest/pull/88 [Marius Gedminas]
Allow checking/unchecking a set of same-named checkboxes by assigning a list of values. [carljm]
Allow checking/unchecking a set of same-named checkboxes by assigning a list of values. [carljm]
fix "AttributeError: 'InputWrapper' object has no attribute 'seek'" [iElectric]
Added xhr=True parameter to TestApp.get, TestApp.post, TestApp.head, TestApp.delete [kharandziuk]
Remove old (and broken?) casperjs/selenium backward compat imports. Fix https://github.com/gawel/webtest-selenium/issues/9 [gawel]
Allow optionally specifying the MIME type of an uploaded form file. Fixes #86 [Marius Gedminas]
Detect JSON if mimetype ends with +json, such as application/vnd.webtest+json [homm]
Detect JSON if mimetype ends with +json, such as application/vnd.webtest+json [homm]
Fixed #72. Use WSGIServer new api even if there waitress has backward compat. [gawel]
Fixed #50. Corrected default value for the delete params argument. [noonat]
Be sure to decode the content if it is gziped before returning it [Alexis Métaireau]
fixed #64. cookiejar api has changed in python3.3 [gawel]
fixed #64. cookiejar api has changed in python3.3 [gawel]
allow to use a fixed StopableWSGIServer [gawel]
Do not alter the BeautifulSoup object when parsing forms. [Georges Dubus]
Remove first newline while parse textarea block, how modern browsers does. [Victor Safronovich] pull #69
Ignore select.error (not socket.error) following StopableWSGIServer.shutdown. [Laurence Rowe]
Ignore select.error (not socket.error) following StopableWSGIServer.shutdown. [Laurence Rowe]
Handle the short form of <select multiple> [Marius Gedminas]
Correctly handle elements with no value attribute [Marius Gedminas]
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]
Treat strings in the WSGI environment as native strings, compliant with PEP-3333. [wosc]
Treat strings in the WSGI environment as native strings, compliant with PEP-3333. [wosc]
Allow TestResponse.click() to match HTML content again. [ender672]
Allow TestResponse.click() to match HTML content again. [ender672]
Support secure cookies [Andrey Lebedev]
Added Pasword field [diarmuidbourke]
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]
Backward incompatibility : Removed the anchor argument of webtest.response.TestResponse.click and the button argument of webtest.response.TestResponse…
drop zc.buildout usage for development, now using only virtualenv [Domen Kožar]
Backward incompatibility : Removed the anchor argument of webtest.response.TestResponse.click 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 webtest.app.TestApp.patch_json [gawel]
Implement webtest.app.TestApp.cookiejar support and kindof keep webtest.app.TestApp.cookies functionality. webtest.app.TestApp.cookies 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
Nothing published for this version
fix tests error due to CLRF in a tarball
fix tests error due to CLRF in a tarball
migrate repository to https://github.com/Pylons/webtest
add travis-ci
migrate repository to https://github.com/Pylons/webtest
Fix a typo in apps.py: 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 https://tools.ietf.org/html/rfc6265#section-5.2
fix an error when you use AssertionError(response) with unicode chars in response
added webtest.ext - allow to use casperjs
added webtest.ext - allow to use casperjs
fix #42 _ Check uppercase method.
fix #33 _ Remove CaptureStdout. Do nothing and break pdb
added post_json, put_json, delete_json
added post_json, put_json, delete_json
fix #25 params dictionary of webtest.AppTest.post() does not support unicode values
improve showbrowser. fixed #23 _
improve showbrowser. fixed #23
print_stderr fail with unicode string on python2
* Added .option() #20 _ * Fix #21 * Full python3 compat
Added .option() #20
Fix #21
Full python3 compat
Added selenium testing framework. See ~webtest.sel module.
Moved TestApp to app.py
Added selenium testing framework. See ~webtest.sel module.
Accept lists for app.post(url, params=[...])
Accept lists for app.post(url, 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.
Fix #10, now TestApp.extra_environ doesn't take precedence over a WSGI environment passed in through the request.
Removed stray print
TestResponse now has unicode support. It is turned on by default for all responses with charset information. This is backward incompatible change if y…
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 webtest.TestResponse.click.
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
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 webtest.TestApp.post, but if you use resp.form file upload fields would not work (from rcs-comp.com 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 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.
Note: these are backward incompatible changes if you are using doctest (you'll have to update your doctests with the new format).
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 app.post 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.
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)
Your coding agent can read these notes before it upgrades. Set up the MCP server →