我有应用程序,我需要以编程方式将文本添加到某些字段中
有什么办法可以解决这个问题
我的代码:
HtmlElementCollection el = webBrowser1.Document.All;
foreach (HtmlElement H in el)
{
if (H.GetAttribute("type").Equals("text") )
H.SetAttribute("value", sendtext);
}
我试图以编程方式单击它
object obj = H.DomElement;
System.Reflection.MethodInfo mi = obj.GetType().GetMethod("click");
mi.Invoke(obj, new object[0]);
它也不起作用