Forum Discussion

jmcwhinney's avatar
jmcwhinney
Contributor
10 years ago

WaitAliasChild is throwing an error. According to docs, it shouldnt

According to the docs, WaitAliasChild should not throw an error, but it should return a stub.

Why then am I getting the attached error?


Thanks!

- James

3 Replies

  • It's throwing that error because there isn't an Alias for the "ModalDialog$" object. That Alias has to exist in TestComplete NameMapping and actually be a child of the object you are calling the function on (in your case TargetObject) for the function to then check if that Alias actually exists in the application you are testing. The function is throwing the runtime error to basically say, "Hey, you are calling me with an Alias that doesn't exist. Give me something that you've already defined in NameMapping so I can check if it exists in your program. If it does I'll return the object, if not I'll return a stub object"

    • jmcwhinney's avatar
      jmcwhinney
      Contributor

      Ah ok I think I get it.

       

      So I should either create an alias or try use WaitChild?