googleid_105206
12 years agoContributor
how to handle invisible Child Tree items?
Hi
I am Working on Flex4.5 based application using TestComplete 8.6.Iam trying click child Tree Item.Parent Tree item having more than 30 childItems.
i have to click 30 th Item.But 30 th item not visible.How to handle this type objects.how handle invisible Child Tree items.i followed below code to handle invisible childItem.But giving Error at (objSelectFolder.FlexObject.ensureIndexIsVisible(ItemIndexByText))line.If any method to handle this type of object.
PropNames= Array("FlexObject.data.name")
PropValues= Array("Smart Searches")
set objparentFolder =Context.FindChild(PropNames,PropValues, 11)
if objparentFolder.Exists then
objparentFolder.Click
else
log.Message "NotFound"
End if
ItemText="AdSearch"
Set data=objparentFolder.FlexObject.data
log.Message data
log.Message data.childItems.length
found = False
For i = 0 To data.childItems.length
If data.childItems.source.item(i).name=ItemText Then
ItemIndexByText = i
log.Message ItemIndexByText
objparentFolder.FlexObject.ensureIndexIsVisible(ItemIndexByText)
delay 2000
found = True
Exit For
End If
Next
propNames = Array("FlexObject.data.name")
propValues = Array("AdSearch")
Set item =page.FindChild(propNames, propValues, 11)
If item.Exists Then
item.Click
delay 5000
Else
End If
Please Suggest me. how to handle invisible Child Tree items.
Thanks,
Vijay