Playback lacks Consistency
Hi!
I am working in automating Flex Controls using Flash Injector. I have a bit wierd scenario. I would like to gather input, if there are some successful trials earlier...
There is a MenuControl that appears on clicking a menu holding sub menus. When child menu is clicked, another MenuControl appears. Let us name it MenuControl1 and MenuControl2 respectively. If the object is identified MenuControl1 will have index as '0' and when MenuControl2 is seen MenuControl1 will have index as '1', leaving MenuControl2 with '0' index. In simplified way, the new control will have the '0' index and old ones are updated in the object browser. May be if I can call this as Cycling Index :) or if Adobe developers have a different name to it...
On recording, there seems to be some intelligence, MenuControl(1) which will no way be there when recording as it will be the new Menucontrol and only one at that time is however updated while auto scripting...
<br />
<div class="sf_ForumsCode">
' there is a menu clicked...
vobject.MenuControl(1).MenuItemRenderer(3).ClickButton 'selecting 4th child menu
vobject.MenuControl(0).MenuItemRenderer(0).ClickButton 'selecting 1st grandchild menu
</div>
Practically on playback this fails. Trying any alternatives also fails. I tried referring vobject.MenuControl(0) both times which could be a resonable try, also with vobject.Refresh. The result is not consistent; it works sometimes and doesn't repeat :(
Is there a problem in Test Complete to catch the refreshed objects (index cycled) in a quick time during playback? Please let me know if there is any alternative way to handle menus in flex. However this Cycling Index problem is also in other controls too...
Regards,
Stan