problems with mapping custom classes to standard classes
Hi, I'm having problems mapping a custom object (class: object) to a standard class such as edit or push_button. The syntax I'm using is as follows (the object name does not get mapped to the recognised winrunner class):
set_record_attr("object_name", "class label", "MSW_id", "index");
When the a different syntax is used to map a MSW_class the object name gets changed from 'object_name' to 'object_name_0'when viewed by the GUI spy after the below script is run The syntax used is:
set_record_attr("MSW_class", "class label", "MSW_id", "index");
I'm using the VB add in, is this supposed to happen? need help!
Re: problems with mapping custom classes to standard classes
Yes, this behaviour is "normal" for WinRunner.
When you change the GUI map configuration, at runtime WinRunner can still recognise the application's objects using the previous GUI map properties. But, when recording, WinRunner now uses a different set of properties and so does not recognise the previous GUI map entry as being the same object.
The different name "something_0" is just the way WinRunner adds an item which generates the same logical name as one already existing.