Hi Rachel,
You may consider this thread as an additional possible approach:
http://smartbear.com/forums/?forumid=81&threadid=83955#83984.
As for the value of the readyState property: it is my understanding, that the browser changes the type of the parent contentDocument property while it renders the initial contents of the page and processes scripts on the page.
After some considerations, I ended up with the following code snippet that works stable so far for me:
If ("iexplore" = Aliases.browser.ObjectIdentifier) Then
' DONE: Check PageObject.contentDocument.readyState <> "complete" for non-IE browser(s)
PageObject.Wait
While 4 <> PageObject.readyState
' Set w = PageObject.Parent.WaitWindow("#32770", "*", -1, 500)
' if (w.Exists) then _
' w.Close
Call aqUtils.Delay(500, "Waiting for the page to load from the web server...")
Wend
Else
Do Until aqObject.IsSupported(PageObject, "contentDocument")
Call aqUtils.Delay(500, "Waiting for the page to load from the web server...")
Loop
Do Until BuiltIn.varDispatch = aqObject.GetVarType(PageObject.contentDocument)
Call aqUtils.Delay(500, "Waiting for the page to load from the web server...")
Loop
Do Until aqObject.IsSupported(PageObject.contentDocument, "readyState")
Call aqUtils.Delay(500, "Waiting for the page to load from the web server...")
Loop
Do Until BuiltIn.varOleStr = aqObject.GetVarType(PageObject.contentDocument.readyState)
Call aqUtils.Delay(500, "Waiting for the page to load from the web server...")
Loop
Do Until "complete" = PageObject.contentDocument.readyState
' Set w = PageObject.Parent.WaitWindow("#32770", "*", -1, 500)
' if (w.Exists) then _
' w.Close
Call aqUtils.Delay(500, "Waiting for the page to load from the web server...")
Loop
End If
Hope it might appear useful for you...