You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried writing tests for this, but I've found a new issue.
After retrieving fields from kwargs["data"], the function processes fields inside form argument.
But, when processing these fields, it does not check if they were already filled with kwargs["data"], and the final request contains more than one value for the field. This could be considered as a normal behavior, except when the concerned fields are empty in the form argument.
For example, with a text input field named "test" , if we leave it empty, then call browser._request(data={"test": "mytext"}) ,
the resulting request will contain both "" and "mytext" for "test"field value.
To avoid this we could choose that kwargs["data] is priority, and, for each key in kwargs["data"], we will ignore the the corresponding field value in the form argument.
The function
_request(self, form, url=None, **kwargs)
from the Browser class retrieves data and files from kwargs argument :data = kwargs.pop("data", dict())
files = kwargs.pop("files", dict())
However, this way of submitting data or files is not tested nor documented.
The text was updated successfully, but these errors were encountered: