Facing "Ambiguous object recognition" warning for several objects
Solved! Go to Solution.
The solution is to keep doing what you have been doing. Try to work on nailing down the property set to use for the object. Basically, the warning means that the identification properties for your object are not specific enough and TC has found 2 or more objects that match your criteria.
Sure, it may seem silly to include all the panels... but that might help. And, keep in mind, you may need to MAP all the panels, but your Alias doesn't need to include them all. That's the beauty of Aliases... it allows you to make amore "consumable" object reference while masking all the hierarchy in your main mapping.
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Issue is not resolved but rather problem is complicated. Mapping parents and increasing the attributes for identification makes the Object Repository cumbersome (and not helpful). Tool is able to eliminate some of the warnings though by just increasing the Auto wait timeout period.
When there are too many nodes in the hierarchy the tool is not smart enough to reach the target object. On the other hand if I cut down the parents (in order to decrease number of nodes), then there is ambiguous warning. And there are not enough ID attributes that i can take into consideration. So, at the moment, I am bypassing such objects in my project and trying to find alternate ways to test that element or feature.
Thanks for the update, @shivam.
Please share with us the approach you will decide to use.
SmartBear Community and Education Manager
i am too facing the same issue, can you please share your approcahes if any.. that sounded as best practices.
Appreciate your help.
- Increase the 'Auto wait timeout period' in project settings
- Improve mapping information of target object: by adding some additional attributes in identification properties
- Improve mapping information of parents (of the target object): a) by by adding some additional attributes in identification properties, b) by adding a greater number of nodes in object tree hierarchy
- Disable the 'Show ambiguous warning' for the object
Note: Step 4 does not solve the problem just masks the warning in logs. And it is quite possible that your script may fail when run on remote machine or under some different environment and configuration (like screen resolution)
P.S : I am still working for the concrete solution (or you can say, a satisfying workaround) to this problem.