Currently, I’m filling out the form on a site with the following:
browser.fill(‘form[firstname]’, ‘Mabel’)
browser.fill(‘form[email]’, ‘hi@hi.com’)
browser.select(‘form[color]’, ‘yellow’)
But the form gets filled out the form sequentially, one after the other. Is there a way to fill out the form all at once?
Thank you and will be sure to vote up and accept the answer!
Browser has a method called:
fill_form(field_values)
It takes a dict parameter, with the field names, and the values, and it fills the form at once.
So you'll use
browser.fill_form(dict)
instead ofbrowser.fill(field, value)
More info about Browser's API and its methods here :
https://splinter.readthedocs.io/en/latest/api/driver-and-element-api.html