Skip to content

Instantly share code, notes, and snippets.

@dck-jp
Created June 6, 2015 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dck-jp/c66f49561fdc7da576af to your computer and use it in GitHub Desktop.
Save dck-jp/c66f49561fdc7da576af to your computer and use it in GitHub Desktop.
SHDocVwSample06
public void ClickButton()
{
var IE = new SHDocVw.InternetExplorer();
IE.Visible = true;
object URL = "http://www.google.com/";
IE.Navigate2(ref URL);
IE.Wait();
var doc = IE.Document as mshtml.IHTMLDocument3;
doc.getElementById("lst-ib").innerText = "ぐるぐる";
IE.Wait();
//検索ボタンをクリック item(index:) or item(name:) で指定可能
doc.getElementsByName("btnK").item(index:0).click();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment