Forum Discussion
With your compoelnent on screen, right click on the item in NameMapping and select aedit. You can add or modify any properties you wish.
Thanks for your reply first, I got it.
Another question I want to ask is how to add AutomationID as the default property? From TestComplete's website, it says that for the object "ObjectIdentifier"
"The value of one of the following native properties of the object (ordered by priority):
I want to use AutomationID as the default value of the "ObjectIdentifier", so that I don't need to add the "AutomationID" manually for each object each time, that would be saving time greatly.
Thanks,
Xiujuan
- AlexKaras7 years agoChampion Level 3
Hi Xiujuan,
Check if NameMapping Template can help in your case: http://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/templates/index.html
- Xiujuan7 years agoNew Contributor
Hi Alex,
Thanks~
Yes I tried the "template" method but for me it doesn't work as described.
My goal is: add "AutomationID" as default identification property for every object/controls.
The first issue is: it requires to fill in the "Category" field myself. I tried to enter in ".NET Objects" and "WPF Controls" as two templates but I am not sure whether the wording is correct. is there any way easier? or is there any category which covers all the controls?
The Second issue is: after I set the template as below: add two templates for two specific objects, and then record a new keyword test, then only the two objects has the AutomationID as their nameMapping property, the other objects still follows the nameMapping property as they were. it's even slower than I manually add automationID to the specific two objects, and my goal is to add AutomationID to all objects.
The third issue is: from http://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/dialo...
it says:
"To modify the value of a base property, enter the new values in the property’s Criteria cell. You can use regular expressions to specify variable parts of the property value. For example, to associate a template with an object that has a specific property regardless of the property value, specify .* in the property’s Criteria cell (this regular expression matches any string)."
So I change the value to be "*" for the two specific objects which were used to setup two templates, then record the keyword test, this time NO object has the "automationID" in their nameMapping, neither does the two specific object.
I am so confused, do you have any suggestions on that? I really don't want to add "AutomationID" manually for each object...
thanks,
Xiujuan
- tristaanogre7 years agoEsteemed Contributor
I don't believe that there is a way to change that hierarchy or priority. If your UI Automation object has a "Name" property, that is what is going to be used.
Related Content
- 2 months agoD0UG
- 9 years agodenhenp
- 2 years agorkadali
- 5 years agolingling_chiang
Recent Discussions
- 20 hours agojstaehlin
- 2 days agoAivanitskiy