InternetExplorer automation
From: HudsonKane (HudsonKane_at_discussions.microsoft.com)
Date: 08/19/04
- Next message: Igor Tandetnik: "Re: SaveAs to a MHT file"
- Previous message: Tristan Leask: "Re: SaveAs to a MHT file"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Aug 2004 04:23:02 -0700
I am using
Interop::SHDocVw::InternetExplorer *ie = new
Interop::SHDocVw::InternetExplorerClass();
Object *o=NULL;
ie->Navigate("https://www.someplace.com",&o,&o,&o,&o);
mshtml::HTMLDocument *myDoc=new mshtml::HTMLDocumentClass();
myDoc = dynamic_cast<mshtml::HTMLDocument *>(ie->Document);
to open IE and navigate to a web page, this page contains a frame
<frame src="/someFrame.jsp" name="someFrame" scrolling="auto" frameborder="0">
which in turn contains a frame
<frame src="/topLeftFrame.jsp" name="topLeft" noresize="noresize"
scrolling="no" frameborder="0">
which contains a form
<form name="searchForm" method="post" action="/searchActionSubmit.do"
onsubmit="return validateSearch()" target="myTarget">
that contains a table with a field
<input type="text" name="activeSearchString" maxlength="20" size="20"
value=""> 
and a button
<td class="search" align=center><a href="javascript:search()"
class="search">Search</a></td>
>From the main page I want to simulate entering text in the editbox and
clicking the button
I assume i am going to have to use one or more HTMLFrameElement, HTMLTable,
and HTMLFormElement but I have not been able to get these working correctly
I can get the first frame usnig
mshtml::HTMLFrameElement *frame =
dynamic_cast<mshtml::HTMLFrameElement*>(myDoc->all->item(S"frameIWant",0));
but I am unable to get the frame within this frame (which in turn has a
frame, which has a frame, which has a table that contains the edibox and
button I want)
thank you
- Next message: Igor Tandetnik: "Re: SaveAs to a MHT file"
- Previous message: Tristan Leask: "Re: SaveAs to a MHT file"
- Messages sorted by: [ date ] [ thread ]