Forum Discussion

handanu's avatar
handanu
Contributor
5 years ago

Same object has different identities, so "the target object does not exist" error occurs.

Hi,

I use property checkpoint on an alert. I get the target object does not exist error.

Because the parent object was not found. When I check parent object's identities, with object Spy, I realize that some of the identities are different for example in name area old value was "WPFObject("xxxWindowxx","DesktopAlert")", new value is "WPFObject("xxxWindowxx","")".

But when I create new project (with different namemaping) I see the alert window has the value WPFObject("xxxWindowxx","DesktopAlert")". 

And I turn my main project and check the window property it seems WPFObject("xxxWindowxx","DesktopAlert")". When I run the test it fails and I check property it is again "WPFObject("xxxWindowxx","")".

I'm so confused. I have to fix it because I use this checkpoint in all tests.

Thanks in advance

  • I guess I have found a way. I have changed the location of the object in name mapping and aliases section. I transport the object from problematic parent to reliable parent. When I run the test, it passes.

    But I still don't understand why alert window's identities changed project to project.

     

  • SebastianP's avatar
    SebastianP
    New Contributor

    HI handanu ,

     To over come the mentioned issue , one possible way is, change the "DesktopAlert" to wildcard value , ie, WPFObject("xxxWindowxx","*"). This might solve the issue for time being, but i dont know exactly why the values change by time.

     

    • handanu's avatar
      handanu
      Contributor

      Hi,

      Thank you or your reply.

      But this time I get "Ambigious recognition of the tested object" warning. It takes time to find the alert. 

      I keep the alert window manually to see the warning.The alert window is invisible after a while (program's behaviour). So if I do not keep the alert manually, the alert will disappear and I will get an error again.

       

      • handanu's avatar
        handanu
        Contributor

        I guess I have found a way. I have changed the location of the object in name mapping and aliases section. I transport the object from problematic parent to reliable parent. When I run the test, it passes.

        But I still don't understand why alert window's identities changed project to project.

         

    • handanu's avatar
      handanu
      Contributor

      Thank you Wamboo,

      But I don't use script, I create keyword tests. Do you have any suggestions that I will apply with keyword testing?

      • Wamboo's avatar
        Wamboo
        Community Hero

        All right,

         

        I've never used the keyword method before, but...

         

        Is there any field to use a regular expression?