Forum Discussion
hi pmallela2,
the alias mechanism is really fine if You have got tests with single, unique UI elements.
If You need to be more flexible, You still can use aliases: in case You want to use one dialog type for different elements, this can also easily be done e.g. by including an asterisk in the alias condition for the dialog caption, masking the element name. BUT: You can only use one single dialog instance, if You open a second one, the alias will probably point to the first one. Dealing with multiple application instances should behave the same way.
To deal with multiple instances, I use a wrapper mechanism described in
How to get access to a second instance of a control? I use the alias to return me one control of the desired kind. Then I iterate the siblings until I've got the desired <new> one, and build my wrapper around it.
All of this is done by a dedicated alias control class. It returns me a new available control and also can deal with the situation that the basic alias may stop existing.
Regards,
Manfred
Related Content
Recent Discussions
- 2 hours agoSubhraDas
- 21 hours agotramuntana