Windows アプリケーションからページ内のボタンをクリックする方法です。
以下のボタンが html で定義されているとして、
<input type = "button" id = "button1" onclick="javascript:foo();" />
HtmlElement element = null;
element = webBrowser1.Document.GetElementById("button1");
element.InvokeMember("click");
javascript の foo() が実行されます。
type="submit" でも可。
0 件のコメント:
コメントを投稿