Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OIE.Document.ReadyState
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00600042
Message ID:
00600129
Vues:
17
Carl,

When I was working on some UT automation stuff several months ago I had to resort to a NavigatePause() method that looked like this:
* provide a pause while the browser navigates to the link
lparameters lcDoc

doevents

do while ( thisform.oBrowser.Busy )
   doevents
enddo

local loDoc

loDoc = eval( "thisform.oBrowser." + lcDoc )
do while ( type( "loDoc.ReadyState" ) == "C" ) and ( loDoc.ReadyState != "complete" ) ) ) && thisform.oBrowser.Busy )
   doevents
enddo
It was called with code like this:
thisform.oBrowser.Document.Frames(3).Navigate( laLinks[i] )
thisform.NavigatePause( "Document.Frames(3).Document" )
>When I try to do things similare to StartUT.prg #1113, this line doesn't seem to be enough:
>
>DO WHILE oIE.Document.ReadyState <> "complete" AND (SECONDS()-nStartSeconds < 30)
>
>Even when oIE.Document.ReadyState="complete", it seems the page isn't ready yet.
>
>If my next line is
>For Each loObj in oIE.Document.all
>
>I get things like "Member DOCUMENT does not evaluate to an object."
>
>I am not using startut's exact code - I added some more checks trying to make suer the page was ready, but still no luck.
>
>Anyone know what the right way to do this is?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform