Forum Discussion
If you already have a computer-readable definition of your UI (e.g. XAML), you could generate a default NameMapping, which would save time instead of using TestComplete UI.
I guess the "reading JSON", "writing XML" is easy; the added value is in exploiting the definition of the UI, which could be heavily dependent on the way (framework, templates...) with which your application is written.
We created a Utility script which we can use to automatically create the name mapping of our dialogs. To use the script, only the window needs to be created manually in NameMapping as a starting point. Our script then recursively reads out the children of the relevant elements and inserts them into the name mapping using AddNamedChild. Elements that are relevant to us are given a special prefix. We then save the whole thing. In a second step, the XML file is actually processed directly and the corresponding aliases are created for the elements with a prefix. It would of course be nicer if you didn't have to edit the XML file directly, but instead had appropriate commands for this.
We created a feature request for this:
Extended Scripting Support for Name Mapping | SmartBear Community
In my opinion, this topic here would be another use case for our feature request.
But I also agree with the previous commentator that the logic behind selecting the right GUI elements for name mapping and aliases is actually where the most work and value is.
Related Content
- 2 years ago
- 11 months ago
Recent Discussions
- 2 days ago