2013-02-01 33 views
0

我如何可以點擊按鈕,並用機械化蟒蛇選中該複選框... HTML代碼:如何按一個按鈕,點擊複選框

<input type="button" id="btn_t" style="width:120px;float:left;margin:10px;margin-top:2px;" value="Apply" disabled=""> 

我試着用:

br.click(id ="btn_t") 

但是,這將引發一個錯誤:

mechanize._form.ControlNotFoundError: no control matching kind 'clickable', id ' 
btn_t' 

回答

0

您的按鈕是不是一個標準的提交按鈕,所以它可能三ggers一些javascript,你將不得不效仿。如果此「點擊」觸發提交,您可以嘗試:

br.submit()