Forum Discussion

Uppi's avatar
Uppi
New Contributor
9 years ago

converting keyword tests into code, results in Mapped Path (Aliases). I want FullName (Sys)

I am New to Test Complete, this might be a little dumb question but i have to ask.

 

So i am working on Windows application(Combination of .Net, Access and VB). Converting keyword test in to code, it converts but the mapping is done with Aliases way, it doesn't work sometimes when i re-run the code. 

 

Is there any settings in TC to set FullName when converted to Code (I am using C# Scripting).

 

Thanks in advance.

  • However the object is referenced in the Keyword Test that you are exporting to code, that is how it gets populated in the code.

    Truthfully, Aliasing is the preferred way to reference AUT objects in either code or keyword tests. The "FullName" you are looking for, for many applications, is usually pretty long and cumbersome to deal with.

    If your tests are failing on occasion with the Aliases, that usually points to a problem with the way the object is mapped and not on whether or not you are using Aliases.  You might need to do some tweaking and adjusting to your mapping to get it to behave better.

     

    Now, that said... when you record/build your keyword test you can have automatic mapping disabled... but any mapping you have already created will persist unless you delete the mapped objects and re-create your test.  There's an option under Tools -> Options -> Engines -> Name Mapping called "Map object names automatically". Uncheck that and you'll get your Sys.Process.blahblahblah names that you are looking for. Personally, I wouldn't go this route. I'd spend the time and get your Aliases right.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    However the object is referenced in the Keyword Test that you are exporting to code, that is how it gets populated in the code.

    Truthfully, Aliasing is the preferred way to reference AUT objects in either code or keyword tests. The "FullName" you are looking for, for many applications, is usually pretty long and cumbersome to deal with.

    If your tests are failing on occasion with the Aliases, that usually points to a problem with the way the object is mapped and not on whether or not you are using Aliases.  You might need to do some tweaking and adjusting to your mapping to get it to behave better.

     

    Now, that said... when you record/build your keyword test you can have automatic mapping disabled... but any mapping you have already created will persist unless you delete the mapped objects and re-create your test.  There's an option under Tools -> Options -> Engines -> Name Mapping called "Map object names automatically". Uncheck that and you'll get your Sys.Process.blahblahblah names that you are looking for. Personally, I wouldn't go this route. I'd spend the time and get your Aliases right.

    • Uppi's avatar
      Uppi
      New Contributor
      Thanks for providing detailed explanation on Aliases. Aliases is working correct with .Net screens but not with some of the VB Object and Access i don't know why, but i will try tweaking the code to make it work before going to FullName. is there any disadvantage in using FullName other than having long script lines? and even if problem is still persistent i can go back to Mapped objects(Aliasing) with out destroying any existing code functionality, right?