Ted_W_Scheafer
11 years agoOccasional Visitor
Waiting for Frame to load.
I am currently encountering an issue from time to time in my scripts about not having permissions to access the frame.contentDocument.readyState. It is never in the same place or in the same script.
Has anyone else ran into this issue? If so, how did you solve for it?
Here is the code that I am executing.
Do While GetTickCount() < stopTime
frames = page.FindAllChildren("ObjectType", "Frame", 5, True)
If UBound(frames) >= 0 Then
waitFrame = False
For i = 0 To UBound(frames)
Set frame = frames(i)
Do While frame.ContentDocument is nothing
aqUtils.Delay(100)
Loop
If frame.Exists And frame.contentDocument.readyState <> "complete" Then
waitFrame = true
Exit For
End If
Next
If Not waitFrame Then
Exit Do
End If
aqUtils.Delay(1000)
End If
Loop
Has anyone else ran into this issue? If so, how did you solve for it?
Here is the code that I am executing.
Do While GetTickCount() < stopTime
frames = page.FindAllChildren("ObjectType", "Frame", 5, True)
If UBound(frames) >= 0 Then
waitFrame = False
For i = 0 To UBound(frames)
Set frame = frames(i)
Do While frame.ContentDocument is nothing
aqUtils.Delay(100)
Loop
If frame.Exists And frame.contentDocument.readyState <> "complete" Then
waitFrame = true
Exit For
End If
Next
If Not waitFrame Then
Exit Do
End If
aqUtils.Delay(1000)
End If
Loop