Thursday, July 22, 2010 8:49 PM
I have a very specific control that has been having issues working with record/playback. I was hoping someone could provide some insight to the situation?
Essentially the control is an edit field with look-up table capabilities (kind of like a combo box, but it pops up a table that you can scroll through instead of a straight list of objects). The playback can select items in the table just fine if the item is in the first page of the table when the drop down occurs. If the playback needs to scroll and search for an item, it will time out and fail (with no scrolling).
I believe the reason for this is how the tables are loaded. To avoid long loading times after clicking the drop down button, only the first few rows (let’s say 10) are loaded, and the scroll bar appears quite large (as if there were only 10 items total). As you click the scroll down button, the table begins to load more rows as requested (let’s again say 10 at a time), and the scroll bar shrinks (to indicate there are now more items).
The tools seem to be able to detect the scroll bar just as well as any other scroll bar, so I'm leaning towards the problem being with how we load the items, and that the items that haven't been discovered yet are not available for searching.
So, are the tools failing because the items they want to find (and scroll for) cannot be found (since they are not discovered yet)?
Thanks for the help. If any clarification is necessary please feel free to ask questions about the matter.
Friday, July 23, 2010 3:43 AM
You have already answered that yourself:) The items beyond 10 items are "virtualized"; and since these items are not in the visual tree, the search itself is failing. This is not a supported CodedUI Test scenario. (There are instances where it does workl, for example in technologies like WPF, there is virtualization support in UIAutomation layer for such virtualized controls. CodedUI Test works for those.)