Same object has different identities, so "the target object does not exist" error occurs.
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
Solved! Go to Solution.
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.
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.
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.
Nice job finding a stable parent object using the extended find! Sometimes machines are quirky and this is the best solution if we can't find a unique static path all the way down to the child object!
You can also dynamically search for these objects using the .find() method.
This is much easier than moving the NameMapping repository.
There is operation field and contains find method.
But I have to update like hundered steps. Because I use this alert as a checkpoint item and use it everywhere.
But in name mapping I only drag and drop the alert from problematic parent to reliable parent. Just once.
As if this were easier way.