Nope, that's what WaitForReadyState does, it delays until IE reaches a ready
state.

Bill

On Tue, Jul 14, 2009 at 3:40 PM, <[email protected]> wrote:

> Try putting a wait timeout (5) seconds in before you loop through the
> nodes.
> It may be that your code is hitting before the page is rendered.
>
>
>
>  Tue, 14 Jul 2009 15:00:51 -0700
>   Bill Anderson <[email protected]> wrote:
> >The following is a cut down version of automating Google searches.
> >
> >goIE = CREATEOBJECT([InternetExplorer.Application])
> >goIE.Navigate2([<<a href="http://www.google.com])"  target="top"
> >>>http://www.google.com])<</a>>
> >WaitForReadyState(4, 5000)
> >loInputElements = goIE.Document.GetElementsByTagName([Input])
> >loGoogleSearchInput = loInputElements.Item(1) && search field
> >loGoogleSearchButton = loInputElements.Item(2)
> >loGoogleSearchInput.Value  = [TEST]
> >loGoogleSearchButton.Click()
> >WaitForReadyState(4, 5000)
> >loNodes = goIE.Document.GetElementsByTagName([A])
> >li = 0
> >
> >FOR EACH loNode IN loNodes
> >
> >  li = li + 1
> >
> >  IF loNode.ClassName = [l]
> >
> >    ?li
> >    ?loNode.InnerHTML
> >    ?loNode.ToString
> >
> >  ENDIF
> >
> >ENDFOR
> >
> >If I run this at the command window (putting the FOR loop in a temp
> program
> >and run it) I get what's expected. If I run it step by step in the
> debugger
> >I get what's expected.
> >
> >But if I run it as a program, I get no display.
> >
> >Suspending the program and trying this at the command window
> >
> >xxx = lonodes.item[1]
> >
> >Produces a "OLE error code 0x80070005: Access is denied." error using IE8.
> >IE6 doesn't provide any error, just doesn't seem to work. Using XP SP3.
> >
> >I assume this is some sort of IE security setting but I wouldn't know
> where
> >to turn. Again, this works at the command window and the debugging window
> if
> >I step through the code...but not running it.
> >
> >Thanks for any help,
> >
> >Bill Anderson
>


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to