exceptions.InvalidSubmitError with submit_form
- Dominant language
- Python
- Stars
- 3.7k
- Forks
- 336
- PR merge metrics
- No merged PRs in 30d
Description
> urlopt = 'http://info512.taifex.com.tw/Future/OptQuote_Norl.aspx'
> browser = RoboBrowser()
> browser.open(urlopt)
> form = browser.get_form()
> form['ctl00$ContentPlaceHolder1$ddlFusa_SelMon'].value =form['ctl00$ContentPlaceHolder1$ddlFusa_SelMon'].options[1]
> browser.submit_form(form)
but it return
> robobrowser\forms\form.py
> in prepare_fields(all_fields, submit_fields, submit)
> 152 if len(list(submit_fields.items(multi=True))) > 1:
> 153 if not submit:
> --> 154 raise exceptions.InvalidSubmitError()
> 155 if submit not in submit_fields.getlist(submit.name):
> 156 raise exceptions.InvalidSubmitError()
> InvalidSubmitError:
I want to select the options[1] but it return the Error. How to fix the problem?
> browser.submit_form(form,submit=form['ctl00$ContentPlaceHolder1$ddlFusa_SelMon'])
I try this way but also return the same error. Can someone help me?
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.