Ask a Question

automatic object naming

oblivionf
Regular Visitor

automatic object naming

Hello. Is there a way to set object name in keyword testing automaticaly or via script. For example, i have the object in on-screen action NameMapping.Sys.Process("**console**").QtObject("mc::MainWindow", *app_name*, 3).QtObject("**vidget**").QtObject("qt_dockwidget_floatbutton"). From time to time this hierarchy may change and new name will be different. How can i get access to the new object name? Maybe i need to call  RefreshMappingInfo Method before every object that may change its hierarhy. Is there a way to insert a script in keyword testing tests window?

2 REPLIES 2
tristaanogre
Esteemed Contributor

What you've described in your naming... is not NameMapping... you're just referencing the NameMapping.Sys node and then calling the regular Object Browser references from there.

You should spend the time actually working on mapping the objects, creating usable aliases, judicially using "Extended Find" to handle shifting hierarchy, etc.  Plenty of help topics in the documentation and a few online videos available, too.


Robert Martin
[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
Extensions available
TanyaYatskovska
SmartBear Alumni (Retired)

Hi @oblivionf,

 

Did you find a solution to your question?

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



cancel
Showing results for 
Search instead for 
Did you mean: