Python mechanize click submit on multi submit form -


i have click on first submit on multi submit form. submit code below:

        <div class="grid ">             <div class="grid__item grid-u-2-10">                 <label class="form__label">auto-fill:</label>             </div>             <div class="grid__item grid-u-8-10" id="autofill-button-container">                 <input type="button" id="autofill" name="autofill" value="auto-fill" class="form__input" onclick="autofill();"  />&nbsp;&nbsp;use autofill first, replace below.             </div>         </div> 

i tried:

br.open(url+"upload.php")  br.select_form(nr=7) r = br.submit(label='auto-fill') 

however returns:

mechanize._form.controlnotfounderror: no control matching kind 'clickable', label 'auto-fill' 

pls help.

you're trying click wrong button. input-button action need go for. assuming you're selecting right form. if not br.select_form(nr=8)

try:

br.submit(name=autofill) 

Comments