Forum Discussion

oblivionf's avatar
oblivionf
Regular Visitor
6 years ago

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

  • tristaanogre's avatar
    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.