Forum Discussion

jzac's avatar
jzac
Occasional Contributor
8 years ago

ios object id keeps getting incremented

So,

I have an ios app that we recently upgraded.

Previously the scripts ran fine.

Now, however, there is one pop-up windows whose button keeps getting re-identified.

i'll map the button, run the script, button won't be recognized, check it with the object spy, and 

its identifier has changed.

typically it migrates from ...window1.alertview0.., to ...window2.alertview0..., etc

All the other objects in the app maintain their identities fine.

has anyone run into this, and what was your solution?

7 Replies

    • jzac's avatar
      jzac
      Occasional Contributor

      thks. unfortunately the part of the id which appears to be inrementing is the object group index (i think).

      The app wont let me replace the integer with a wild card.Maybe setting that index as a project variable

      will get me around this.....

       Weird that this is the only object i have this problem with.

      • jzac's avatar
        jzac
        Occasional Contributor

        "Aliases.Device.process<product name>.window5.alertview0.password_popup.cancel_button"

           "window5" keeps incrementing.

  • baxatob's avatar
    baxatob
    Community Hero

    Please provide a screenshot how this object looks in Object Browser.

    • jzac's avatar
      jzac
      Occasional Contributor

      Thanks Guys,

      I got pulled off this yesterday.

      I didn't have any luck using wildcards, but i appeared to have solved the problem by remapping the object and

      manually selecting properties which avoid the incremented id.there isn't much on the screen at this point so

      there is very little else for the app to select.Wouldn't work in another context but it seems to be working so far in

      this situation.i'll look into the required children solution when i get a chance.thanks a bunch!

       

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        OK, thank you for the update.

         

        > [...]  i appeared to have solved the problem by remapping the object [...]

        Actually... One of the best practices for TestComplete is not to use the automatic NameMapping, but to disable automatic mapping in the settings; using the ObjectBrowser, carefully investigate that part of the tested application that is going to be used in the test and manually map all required elements so that they use unique and stable identification attributes and only then start to either record or write test code.