Forum Discussion
Thanks for the help
In the Waitproperty I have used it as string also no outcome from that
As you suggested I have used the alternative method as below.
But my question is …if test complete is having built in property to wait for page? Why cant we use those methods? Instead of using the find object method?
'parentPageObject - Page Object reference
'PropertyName = Array("className")
'PropertyValue = Array(" x-panel x-panel-noborder x-border-panel")
MAX_ITERATION = 20
Call VerifyPageDownloadForClassObject(PageObject,PropertyName,PropertyValue)
Function VerifyPageDownloadForClassObject(parent,PropertyName,PropertyValue)
'For Handing Exceptions
On Error Resume Next
VerifyPageDownloadForClassObject = False
If parent.Exists = False Then
Log.Error("Error in VerifyPageDownloadForClassObject: Parent Object does not exists - )
End If
iteration = 1 'Iteration for finding each child
Set parentObj = parent
flag = False ' Set the flag as true before each loop
Do
Set ChildObj = parentObj.FindChild(PropertyName, PropertyValue, 500)
If ChildObj.Exists = True Then
'Child found - so - Re-set parentObj with the childObject
parentObj.wait
VerifyPageDownloadForClassObject = True
Else
iteration = iteration + 1
If iteration >= MAX_ITERATION Then
Log.Error("Max Iteration hit, while waiting for child:")
End If
End If
Loop Until flag = True
End Function
Related Content
Recent Discussions
- 7 hours agoSubhraDas
- 12 hours agoJacobjacob44