Created
June 6, 2015 11:25
-
-
Save dck-jp/519bf9f5acef3555b595 to your computer and use it in GitHub Desktop.
SHDocVwSample10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ClickImage() | |
{ | |
var IE = new SHDocVw.InternetExplorer(); | |
IE.Visible = true; | |
object URL = "http://finance.yahoo.co.jp/"; | |
IE.Navigate2(ref URL); | |
IE.Wait(); | |
var doc = IE.Document as mshtml.IHTMLDocument3; | |
foreach (mshtml.HTMLImg img in doc.getElementsByTagName("img")) | |
{ | |
if (img.alt == "日経平均株価") { img.click(); } //altの値を見て選択 | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment