Blue Prism中Win32与AA Spy模式的差异及场景选型咨询
Blue Prism: Win32 Spy vs AA Spy – Differences & Use Cases
Alright, let’s dive into the key differences between Blue Prism’s Win32 Spy and AA Spy modes, and walk through when you should use each for your automation workflows.
Core Differences
Let’s break down the fundamental distinctions between the two:
Underlying Technology
- Win32 Spy relies on traditional Windows API calls (think
User32.dlland related system libraries) to interact with and identify standard Windows controls. It’s rooted in the native Win32 windowing system. - AA Spy uses Microsoft’s Active Accessibility (AA) framework, a legacy accessibility API designed to help assistive technologies interact with UI elements. It taps into accessibility properties exposed by applications.
- Win32 Spy relies on traditional Windows API calls (think
Supported Control Types
- Win32 Spy excels with standard Win32 controls: classic buttons, text boxes, list boxes, and windows built with native C++/Win32 tools. It struggles with modern or custom controls like WPF, WinForms, or most web elements.
- AA Spy has broader support: it can recognize WPF, WinForms, many web controls (especially older IE-based ones), and custom controls that implement AA accessibility interfaces. If an app is built with accessibility in mind, AA Spy can usually pick up its elements.
Recognition Precision & Available Properties
- Win32 Spy grabs basic, low-level properties: window handles, class names, titles, and positions. These can be fragile if the app’s UI layout or text changes.
- AA Spy pulls richer, more stable accessibility properties: automation IDs, control roles (e.g., "button", "text box"), states (enabled/disabled, focused), and descriptive names. These are less likely to break when the UI is tweaked.
Performance
- Win32 Spy is generally faster since it uses direct system calls without traversing an accessibility tree. It’s ideal for workflows that need quick, repeated control interactions.
- AA Spy can be slower, especially on complex UIs, because it has to navigate the hierarchical accessibility tree to find elements.
Permission Requirements
- Win32 Spy typically works with standard user privileges—no need for admin rights in most cases.
- AA Spy may require elevated permissions (running Blue Prism as admin) when interacting with protected system windows or apps that run with admin privileges, since accessibility APIs sometimes need higher access to hook into those processes.
When to Use Which Spy Mode
Choose Win32 Spy When:
- You’re automating pure native Win32 applications (e.g., legacy Notepad, old C++ desktop tools, system utilities like Task Manager’s basic view).
- Speed is critical—your workflow needs rapid control identification and interaction.
- The target controls don’t expose AA accessibility properties (common with some very old or poorly designed custom controls).
Choose AA Spy When:
- You’re working with modern .NET apps (WPF/WinForms) or web applications (especially older IE-based ones).
- You need stable, reliable recognition: AA’s automation IDs or role properties are less prone to breaking than Win32’s class names or titles.
- Win32 Spy can’t detect the control (e.g., custom-rendered buttons, hidden UI elements that expose accessibility properties).
- You’re automating apps built with accessibility in mind—AA Spy will leverage those built-in properties for better control.
内容的提问来源于stack exchange,提问作者MMR
相关产品推荐
相关产品推荐

