Forum Discussion
I have a VB6 app to deal with that is still being developed (don't ask) that has gone waaaaay beyond the number of controls limit on a form, using picBoxs etc. These controls change their names pretty much every build so no good mapping them.
I had to write a function using 'FindChild' to find a child object of one of it's containers by a partial of it's name and it's index value. Then for each action call this function.
Sometimes pre-mapping all the objects isn't an option.
liquidphantom wrote:
I have a VB6 app to deal with that is still being developed (don't ask) that has gone waaaaay beyond the number of controls limit on a form, using picBoxs etc. These controls change their names pretty much every build so no good mapping them.
I had to write a function using 'FindChild' to find a child object of one of it's containers by a partial of it's name and it's index value. Then for each action call this function.
Sometimes pre-mapping all the objects isn't an option.
Wow... well, yeah, in that case, definitely need to find some other way around... but that's assuming that the "Name" property is the only property that matters for mapping. I'm working with an application right now that has a LOT of components that, for the most part, look almost exactly the same in the Object browser with regards to the VB6 name property... however, using things like "WndCaption" or other similar values, we've found a way to uniquely map the objects... it takes a bit more work than just using the Name, but it does eventually work...
... but suffice it to say, you're experience is one where, perhaps, using an alternative method may be better.... or, sit down with the development staff and say, "Hey, ya know... my automation is here to help you... but it's a bit difficult to do this with the dynamic factors you've introduced. Can we establish some sort of identification methodology to enable the automation to work better?"... of course, this implies that your developers see the test automation as a benefit... but that's another story. :)