From e29ab4d112dfa1d4846660000834eee21abf9361 Mon Sep 17 00:00:00 2001 From: Julia Medina Date: Wed, 12 Mar 2014 06:43:50 -0300 Subject: [PATCH] New doc: clickdata in Formrequest.from_response Documentation about: * clickdata parameter in Formrequest.from_response * nr attribute in clickdata dict * default behaviour when clickdata is None --- docs/topics/request-response.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/topics/request-response.rst b/docs/topics/request-response.rst index a142f6690..a0e87bf35 100644 --- a/docs/topics/request-response.rst +++ b/docs/topics/request-response.rst @@ -266,7 +266,7 @@ fields with form data from :class:`Response` objects. The :class:`FormRequest` objects support the following class method in addition to the standard :class:`Request` methods: - .. classmethod:: FormRequest.from_response(response, [formname=None, formnumber=0, formdata=None, formxpath=None, dont_click=False, ...]) + .. classmethod:: FormRequest.from_response(response, [formname=None, formnumber=0, formdata=None, formxpath=None, clickdata=None, dont_click=False, ...]) Returns a new :class:`FormRequest` object with its form field values pre-populated with those found in the HTML ``
`` element contained @@ -303,6 +303,13 @@ fields with form data from :class:`Response` objects. overridden by the one passed in this parameter. :type formdata: dict + :param clickdata: attributes to lookup the control clicked. If it's not + given, the form data will be submitted simulating a click on the + first clickable element. In addition to xml attributes, the control + can be identified by its index relative to other submittable inputs + inside the form, via the ``nr`` attribute. + :type clickdata: dict + :param dont_click: If True, the form data will be submitted without clicking in any element. :type dont_click: boolean