我必须在多次提交表单上点击第一次提交。提交代码如下:
<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();" /> Use AutoFill first, as it will replace everything below.
</div>
</div>
我试过了:
br.open(url+"upload.php")
br.select_form(nr=7)
r = br.submit(label='Auto-Fill')
然而它会返回:
mechanize._form.ControlNotFoundError: no control matching kind 'clickable', label 'Auto-Fill'
请帮助。
答案 0 :(得分:0)
尝试:
br.submit(name=autofill)