[英]How to automate third-party UI control
I'm trying to extracting data from third-party software. 我正在尝试从第三方软件中提取数据。 The window has a customised tab control (not the standard one) which contains multi SysTreeView32 in tabs.
该窗口具有自定义选项卡控件(不是标准选项卡),其中包含选项卡中的多个SysTreeView32。
The software has different versions and each version has different set of tabs. 该软件具有不同的版本,每个版本都有不同的选项卡集。
Both Inspect.exe and Spy++ only show the control itself without any information about the tab children. Inspect.exe和Spy ++都只显示控件本身,而不显示有关选项卡子项的任何信息。
Do you know how to programmatically select the specific tab by its title? 您知道如何以编程方式按标题选择特定选项卡吗?
Here's the information of the 3rd-party control from Inspect.exe 以下是Inspect.exe的第三方控件的信息
How found: Mouse move (292,346)
hwnd=0x005203F6 32bit class="Afx:5080000:0:10003:0:0" style=0x56000000 ex=0x0
Name: ""
ControlType: UIA_PaneControlTypeId (0xC371)
LocalizedControlType: "窗格"
BoundingRectangle: {l:98 t:327 r:410 b:1014}
IsEnabled: true
IsOffscreen: false
IsKeyboardFocusable: true
HasKeyboardFocus: false
AccessKey: ""
ProcessId: 36076
RuntimeId: [2A.5203F6]
AutomationId: "221"
FrameworkId: "Win32"
ClassName: "Afx:5080000:0:10003:0:0"
NativeWindowHandle: 0x5203F6
ProviderDescription: "[pid:41692,hwnd:0x5203F6 Main:Nested [pid:36076,hwnd:0x5203F6 Annotation(parent link):Microsoft: Annotation Proxy (unmanaged:uiautomationcore.dll); Main:Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)]; Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)]"
IsPassword: false
HelpText: ""
LegacyIAccessible.ChildId: 0
LegacyIAccessible.DefaultAction: ""
LegacyIAccessible.Description: ""
LegacyIAccessible.Help: ""
LegacyIAccessible.KeyboardShortcut: ""
LegacyIAccessible.Name: ""
LegacyIAccessible.Role: 客户端 (0xA)
LegacyIAccessible.State: 可设定焦点 (0x100000)
LegacyIAccessible.Value: ""
IsAnnotationPatternAvailable: false
IsDragPatternAvailable: false
IsDockPatternAvailable: false
IsDropTargetPatternAvailable: false
IsExpandCollapsePatternAvailable: false
IsGridItemPatternAvailable: false
IsGridPatternAvailable: false
IsInvokePatternAvailable: false
IsItemContainerPatternAvailable: false
IsLegacyIAccessiblePatternAvailable: true
IsMultipleViewPatternAvailable: false
IsObjectModelPatternAvailable: false
IsRangeValuePatternAvailable: false
IsScrollItemPatternAvailable: false
IsScrollPatternAvailable: false
IsSelectionItemPatternAvailable: false
IsSelectionPatternAvailable: false
IsSpreadsheetItemPatternAvailable: false
IsSpreadsheetPatternAvailable: false
IsStylesPatternAvailable: false
IsSynchronizedInputPatternAvailable: false
IsTableItemPatternAvailable: false
IsTablePatternAvailable: false
IsTextChildPatternAvailable: false
IsTextEditPatternAvailable: false
IsTextPatternAvailable: false
IsTextPattern2Available: false
IsTogglePatternAvailable: false
IsTransformPatternAvailable: false
IsTransform2PatternAvailable: false
IsValuePatternAvailable: false
IsVirtualizedItemPatternAvailable: false
IsWindowPatternAvailable: false
FirstChild: "" 树
LastChild: "" 树
Next: [null]
Previous: [null]
Other Props: Object has no additional properties
Children: "" 树
Ancestors: "" 窗格
"" 窗格
"" 窗格
"V6" 对话框
"" 窗格
"" 窗格
"" 容器
"V9.32" 窗口
"桌面" 窗格
[ No Parent ]
If "AutomationId" is unique, can we try to map the logical names with the "AutomationId" & use those fields in automation. 如果“AutomationId”是唯一的,我们可以尝试使用“AutomationId”映射逻辑名称并在自动化中使用这些字段。 I may be wrong, but a possible solution.
我可能错了,但可能是一个解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.