Contributions
Re: How to use AutomationID in nameMapping to identify WPF objects uniquely
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 identificationpropertyfor every object/controls. The first issue is:it requires tofill 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, Xiujuan3.1KViews0likes0CommentsRe: How to use AutomationID in nameMapping to identify WPF objects uniquely
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): Name AutomationID ClassName" please refer to; https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/uia/objectidentifier-property-uia-object.html?q=objectIdentifier#_ga=2.168242209.1802664049.1494696455-134552010.1466044916 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 besaving time greatly. Thanks, Xiujuan3.1KViews0likes3CommentsHow to use AutomationID in nameMapping to identify WPF objects uniquely
Hi, I am automating an WPF application whose control names may change during software development. So I am planning to use Automation IDs to identify objects uniquely. Is there any way to do this using TestComplete? The TestComplete version I am using is 12.30. I have made below setup: 1. Go to File->Current Project Properties->Open Applications->UI Automation 2. Enable the asterisk (*) item in the list of accepted windows. 3. Go to File->Current Project Properties->Open Applications->General 4. Move the NativeUIAObject to the top of the priority list. 5. Record one action in keyword test, then the default properties of the nameMapping contains: FrameworkID; ClassName; LocalizedControlType; ObjectIdentifier. And the value of ObjectIdentifier is the same with the value of the object in NameMapping hierarchy. And I have found out that the "AutomationID" is a different property compared with "ObjectIdentifier". Thanks in advance! Thanks, Xiujuan Thanks, Xiujuan3.1KViews0likes5Comments