I have a method that I use to access data in an IFrame. How fun it is that the answer is never recorded or used: P. Feel free to modify and abuse:
public HtmlElementCollection GetIFrameElements(String tmpTag, int Frame) { HtmlElementCollection tmpCollection = mWebBrowser.Document.Window.Frames[Frame].Document.Body.GetElementsByTagName(tmpTag); return tmpCollection; }
Then I use it to search for any Im element after:
foreach (HtmlElement el in GetElements("input")) { if (el.GetAttribute("id").Equals("hasNoGoogleAccount")) { el.InvokeMember("click"); } }
You can always change the method to iterate over all iFrames, etc. blah blah, but that should be enough to make you move. Rate me! Im new
source share