-
Notifications
You must be signed in to change notification settings - Fork 112
Closed
Labels
Description
Anonymous:
HTML5 adds a new attribute to input tags, named "form":
( see http://dev.w3.org/html5/spec/single-page.html#form-associated-element ).
If an input has a "form" attribute, webtest breaks when one
accesses response.forms:
TypeError: init() got multiple values for keyword argument 'form'
(this is on line 1563 of app.py in webtest 1.4.0)
The problem is actually on line 1206, which includes a positional arg called
'form'. An attribute named 'form' will now be passed in attrs, causing the
conflict.
def init(self, form, tag, name, pos, value=None, id=None, attrs):
Iwan Vosloo:
I guess supporting form-associated elements is actually a slightly bigger issue
than that conflicting kwarg... WebTest would have to make sure it collects all
the inputs of a particular form - including those that are associated with the
form but located elsewhere.
URL: https://bitbucket.org/ianb/webtest/issue/45/html5-form-associated-inputs-break-webtest
bchopson