I use the Mechanize for filling the form of filtering. My code:
br = Browser()
br.open(self.domain)
br.select_form(nr=1)
br.find_control("pf_keywords").value = "Lisp"
response = br.click(type='button', nr=0)
#or
response = br.submit(label='Применить фильтр')
At the same time, submit button is not in the list of controls for this form. Html code for this button:
<button type="button" class="b-button b-button_flat b-button_flat_green" onclick="$('frm').submit();">Применить фильтр</button>
Because of this, using the method click() and submit() impossible to produce form submission. In these methods, there is a search of the desired control with the parameters passed to the control environment forms, as desired button is not there, raise a bug :
mechanize._form.ControlNotFoundError: no control matching type 'button', kind 'clickable'
What should I do? How can push a button and get the result?