Assume a UI where there are multiple tab pages, each page has a zoom slider. How do I get the zoom slider of a particular named tab page ?
I've tinkered a bit and what worked was
- get the window by name
- get the tab page by tab header
- then fall back to UI automation - tabPage.AutomationElement.FindAll or FindFirst with the right constraint/condition
Is there a more "white" way to get hold of child controls within a parent container/control ?
Also in some cases, the child controls are not accessible - UISpy shows them only in the raw / unfiltered view and not in the control view. e.g. A DataGridCell shows a certain value within a TextBlock. The UISpy control view ends at a custom control for
DataGridCell ; the raw view shows more children under it. Does White have a native way to get to the raw children ? I coded up an extension method that finds raw children but was wondering if I reinvented the wheel coz I couldn't find it.
Finally falling back to UI Automation meant that I lost out on the really nice White UIItem wrappers. I hacked it by doing something like
new Button(buttonAutomationElementSearchResult, NullActionListener)
It works but is it the right approach to cast from AutomationElement to specific UIItem?
So that's 3 questions in all... In summary - very impressed with this framework. Great work!!