如何使用调用后面的C#code对WebKitWebBrowser表单按钮提交? 我可以通过寻找控制
webKitBrowser.Document.GetElementById(电子邮件)的setAttribute(价值,argeure)。
但疗法任何方法来调用这个样子?
webKitBrowser.Document.GetElementById(签到)调用(点击)。
解决方案
您应该用JavaScript做到这一点。即写一些JS的WebKitWebBrowser,它得到的表单元素,并呼吁 .submit()
就可以了。
how to invoke form button submit on WebKitWebBrowser using c# code behind? i can find the control using
webKitBrowser.Document.GetElementById("Email").SetAttribute("value", "argeure");
but is ther any method to call like this?
webKitBrowser.Document.GetElementById("signIn").Invoke("click");
解决方案
You should do it with javascript. ie write some js to the WebKitWebBrowser, which gets the form element and calls on .submit()
on it.