I have opened a site by giving ID and password through webbrwoser1.navigate method. Then on the opened page there is a 3frames. I need to click a button inside a frame say "a". How can i do that?
These all are happ开发者_开发百科ening inside the webbrowser control box.
First option
HtmlElement el = extWebbrowser.Document.Window.Frames["YourFrame"].Document.All["YourElement"];
object obj = el.DomElement;
System.Reflection.MethodInfo mi = obj.GetType().GetMethod("click");
mi.Invoke(obj, new object[0]);
Second Option
extWebBrowser.Document.Window.Frames["YourFrame"].Document.All["YourElement"].InvokeMember("click");
精彩评论