Forum Discussion

Natasha_2012's avatar
Natasha_2012
Contributor
8 years ago
Solved

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

4 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    If you try 

     

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

     

    does that work?

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        How about a longer wait time?

         

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