Forum Discussion
Thanks for Reply
I have used the below function to achieve my goal …but WaitProperty function is always returns false
I have used other method to wait for the page – wait child and others
Please let me know how to use WaitProperty method ? need some example
Please find the sample code ----
'parentPageObject - Page Object reference
'PropertyName = Array("className")
'PropertyValue = Array(" x-panel x-panel-noborder x-border-panel")
Call VerifyPageDownloadForClassObject(PageObject,PropertyName,PropertyValue)
'Function
Sub 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 - Parent URL "+parent.url+" and looking for child - "+childStr )
End If
iteration = 1 'Iteration for finding each child
Set parentObj = parent
flag = False ' Set the flag as true before each loop
Do
flag = parentObj.WaitProperty(PropertyName, PropertyValue, W_15SEC)
If flag = 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:" + PropertyValue +"iteration : "+CStr(iteration) + "MAX_ITERATION : "+CStr(MAX_ITERATION)+" - Parent URL "+parent.url+" and looking for child - "+PropertyValue )
End If
End If
Loop Until flag = True
End Sub
Related Content
Recent Discussions
- 9 hours agoSubhraDas