Forum Discussion

Mojo's avatar
Mojo
Occasional Contributor
8 years ago

Recognition string of object frequently changing in external repository

Hi,

I am using an external notepad repository for keeping the recognition string of the objects of my application
(Windows application). Then, i am using keywords against which functions are written to return stub objects
and perform actions as per my requirement. But, after each new build of the application, the entire recognition of
some of the objects completely changes. While for some of them, i am using wildcards(*), but for some objects, the entire
class changes. What can be done to reduce maintainability of the repository? Any help will be greatly appreciated.

  • If you don't want to use the NameMapping feature of TestComplete, rather than using the long recognition string, you might be better off in determining identification properties similar to the way NameMapping works.  For example, an object may have a class and a caption, two things that will change rarely, regardless of how the rest of the application changes.  So, instead of the long string, use those two properties and their values and then utilize the built in "Find" or "FindChild" methods of TestComplete to find and return the specific objects.

  • sanjay0288's avatar
    sanjay0288
    Frequent Contributor

    Can you provide a snapshot of the objects which got changed. Along with the snapshot of the object notepad file. So that can quickly look into it and provide a solution. 

    • Mojo's avatar
      Mojo
      Occasional Contributor

      As seen in the screen shot it is the "add "button in the left bottom corner.

      In the earlier build it was:(in C# script)

      Sys["Process"]("SoftControllerPanel")["Window"]("WindowsForms10.Window.8.app.0.141b42a_r12_ad1", "SoftController", 1)["Window"]("WindowsForms10.BUTTON.app.0.141b42a_r12_ad1", "&Add", 1)

      In the new build it is:

      Sys["Process"]("SoftControllerPanel")["WinFormsObject"]("SoftControllerDialog")["WinFormsObject"]("m_AddButton")

       

      Screen shot is attached

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        If you don't want to use the NameMapping feature of TestComplete, rather than using the long recognition string, you might be better off in determining identification properties similar to the way NameMapping works.  For example, an object may have a class and a caption, two things that will change rarely, regardless of how the rest of the application changes.  So, instead of the long string, use those two properties and their values and then utilize the built in "Find" or "FindChild" methods of TestComplete to find and return the specific objects.