Forum Discussion

Natasha_2012's avatar
Natasha_2012
Contributor
9 years ago

WaitAliasesChild() cannot find mapped object.

 I have the screen having object mapped name as “WelcomeWorkspaceView”.  Refer to the ObjectMapping.png attached for my object mapping set up.

 

I have script below,When executing,  the myTestObj returns the expected object.  However the myTestObj2 is returned nothing.  Refer to attached screenshot Scripts.png

 

Set myTestObj = Aliases.NVivo.HwndSource_ShellView.Loading_.WelcomeWorkspaceView

Set myTestObj2 = Aliases.NVivo.WaitAliasChild("WelcomeWorkspaceView",100)

  • Has to be Set myTestObj2 = Aliases.NVivo.HwndSource_ShellView.Loading_.WaitAliasChild("WelcomeWorkspaceView",100)

    I have to get direct parent object first.WaitAliasChild() can find only the direct child, not grand child.  And this child order is defined on the Alias Tree, not the Object Map Tree which I did not realise.  TestComplete support team has pointed out where I did wrong. According to my Alias Tree, I was looking for great grand child using the WaitAliasChild().  That was why it found nothing

     

    Thanks heaps for all your helps

  • If you try 

     

    Set myTestObj2 = Aliases.NVivo.HwndSource_ShellView.WaitAliasChild("WelcomeWorkspaceView",100)

     

    does that work?

      • Marsha_R's avatar
        Marsha_R
        Moderator

        How about a longer wait time?

         

        What test are you using to see what's returned?