Posted on 2002-04-19
I am writing a program in VC 6.0 that will automate input of text on a web page text box. I am using the CWebBrowser2 control and here is the code that I am using:
MSHTML::IHTMLDocument2Ptr pDoc= m_web.GetDocument(); MSHTML::IHTMLElementCollectionPtr pAllElems= pDoc->all;
MSHTML::IHTMLInputTextElementPtr pTextInput= pAllElems->item("editbox_name");
pTextInput->value = "some text";
This code is working fine; my problem is that I have encountered a web page that has mulitiple frames, and I need to specify which frame to select before I can run this.
Thanks very much.