pywinauto/pywinauto
在 GitHub 查看VisualChildren() method might analyze rectangles and return list of controls that are inside the bigger rectangle
Open
#131 创建于 2015年12月23日
Priority-Lowenhancementhelp wanted
描述
The feature is proposed by HabraHabr.ru user @EvilsInterrupt.
Simple example is a GroupBox rectangle which can contain few radio buttons (but they are not children in the windows hierarchy) so that app.Dialog.GroupBox.Children() would return empty list.
Proposed method VisualChildren() might return a list containing the same or lower level controls (another way: all the controls for the top level parent) that are drawn inside the visually "parent" rectangle.
Another proposal includes named sub-page areas like CenterArea, LeftArea or something like that.
MainWindow.CenterArea.GroupBoxes['Scan Options'].Children()
['checkbox name 1', 'checkbox name 2', ...., 'checkbox name N']
MainWindow.CenterArea.GroupBoxes['Where to Scan'].Children()
['radio button name 1', 'radio button name 2', ...., 'radio button name N']
We may think how to formalize it.