splinter
splinter copied to clipboard
fill_form - option to ignore missing fields?
Hi,
Currently, when you use fill_form, and there is an key present in your dict, that is not present on the page, it will raise a:
ElementDoesNotExist: no elements could be found with name "cvv2_cc"
Would it be possible to make configurable fill_form to ignore missing fields?
Basically, I'd like it to fill in as many of the fields as it can, and if there are any missing, just continue on. (In my case, I have a dict that I'd like to use on two different pages - one of those pages has an extra field, I'd rather not duplicate the whole dict again).
Thoughts?
Cheers, Victor
we can add a parameter, something like:
browser.fill_form(..., ignoring_missing=True)
Implemented by #821