cancel
Showing results for 
Search instead for 
Did you mean: 

Facing "Ambiguous object recognition" warning for several objects

SOLVED
Occasional Contributor

Facing "Ambiguous object recognition" warning for several objects

I am facing "Ambiguous recognition of tested object" warning several times on various pages and objects of my web application. I have tried to improve the mapping information for these objects by adding some additional attributes in identification properties. But it does not help. And this problem causes other issues like too much time for identifying, other times script fails! I have seen in Object browser that TestComplete identifies the HTML hierarchy as panels mostly (no matter if it is DIV,SPAN,INPUT,KENDOBOX, etc). And it will be ridiculous to add most of the parent hierarchy into NameMapping! Also, FindChild method is not working as parent itself does not have Identifiable attributes (as per Tool's OI). Does anyone know a solution to this? TIA.
1 ACCEPTED SOLUTION

Accepted Solutions
Occasional Contributor

Re: Facing "Ambiguous object recognition" warning for several objects

Hi Poornima,

 

Try these:

  1. Increase the 'Auto wait timeout period' in project settings
  2. Improve mapping information of target object:  by adding some additional attributes in identification properties
  3. 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
  4. 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.

 

BR,

Shivam

 

 

7 REPLIES 7
Highlighted
Community Hero

Re: Facing "Ambiguous object recognition" warning for several objects

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.


Robert Martin
[Community Expert Group]
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
Extensions available
Community Manager

Re: Facing "Ambiguous object recognition" warning for several objects

Thanks for the help, Robert.

@shivam, was the issue resolved?

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Occasional Contributor

Re: Facing "Ambiguous object recognition" warning for several objects

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.

Community Manager

Re: Facing "Ambiguous object recognition" warning for several objects

Thanks for the update, @shivam.

Please share with us the approach you will decide to use.

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Occasional Contributor

Re: Facing "Ambiguous object recognition" warning for several objects

hi Shivam 

 

i am too facing the same issue, can you please share your approcahes if any.. that sounded as best practices.

 

Appreciate your help.

 

Thank you

Poornima

Occasional Contributor

Re: Facing "Ambiguous object recognition" warning for several objects

Hi Poornima,

 

Try these:

  1. Increase the 'Auto wait timeout period' in project settings
  2. Improve mapping information of target object:  by adding some additional attributes in identification properties
  3. 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
  4. 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.

 

BR,

Shivam

 

 

Occasional Contributor

Re: Facing "Ambiguous object recognition" warning for several objects

Thank you Sivam, i shall try and let you know in either case.

 

Regards

Poornima.

New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2
Top Kudoed Authors