Composed UIItems

Oct 20, 2008 at 10:45 AM
Hi,
I'm trying White for less than a month now so I apologize if these questions/remarks are not appropriate for this forum.
I've noticed that when I get all buttons, or all objects, White returns buttons like Small/Large Increment/Decrement, the Minimize/Maximize/Close Buttons of Windows, the DropDown of Comboboxes, etc. Shouldn't these buttons be part of the component their part of instead of being returned as individual buttons? and their actions be made through their main component?

Thanks
José Tavares
Coordinator
Oct 22, 2008 at 3:18 AM
To start off I should say that you are right in expecting the API to work like that. This is something I would fix going forward.
But GetMultiple is more of a way of helping debug than to be used, because Get method should be sufficient for most purposes. Do let me know what are your thoughts on it.
Oct 22, 2008 at 10:14 AM
Edited Oct 22, 2008 at 10:29 AM
Well in my case I only use GetMultiple instead of Get.
I'm doing a GUI Ripper application, that in a first step try to create a model of the application, so I want to get all the elements, check which of them have listeners associated and registers it. Only later on I generate test cases to be executed in the AUT and then I use Get instead.
Anyway, I continued messing around a little bit and found out that if I use:
            AutomationElementFinder f = new AutomationElementFinder(window.AutomationElement);
            AutomationElementCollection e = f.Children(AutomationSearchCondition.All);
I only get the "composed" items of the Window, i.e, I don't get the Minimize, Maximize and Close Buttons neither System Menu, I just get the TitleBar AutomationElement. In my view this is how GetMultiple should behave.
But I would also like to hear from other users. I don't know how often GetMultiple is used and under what circumstances..

Regards
José Tavares
Coordinator
Nov 9, 2008 at 12:42 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.