nun*_*nos 12 python mechanize button
我有一个带<input type="button" name="submit" />按钮的表单,希望能够点击它.
我试过mech.form.click("submit")但是出现了以下错误:
ControlNotFoundError: no control matching kind 'clickable', id 'submit'
mech.submit() 也不起作用,因为它的类型是按钮而不是提交.
有任何想法吗?谢谢.
nos*_*klo 21
单击type="button"在纯HTML的形式什么都不做.要做任何事情,必须涉及到javascript.
并且mechanize不运行javascript.
所以你的选择是:
mechanize它将要做的事情spidermonkey运行JavaScript代码我会做第一个,因为使用spidermonkey似乎很难,可能不值得.