mirror of
https://github.com/lahfir/agent-desktop.git
synced 2026-08-09 00:17:27 +00:00
Every interaction records pre-state, action, then an independent re-read -- never the call's return value. Toggle proves why: TogglePattern flips WPF ToggleState without raising Click, so the fixture's status sink stays silent while the element itself changed. Trusting the sink alone would have recorded a failure that did not happen. Posted keystrokes are not uniformly dead. WM_KEYDOWN posted to a Win32 edit control does register, because TranslateMessage runs in the target thread's own pump and synthesises the character regardless of how the message arrived; what the path cannot carry is modifier state. Against Chromium it does not register at all, with every call still returning success. Establishing that needed an idle control pass: the Chromium tree moved on its own between two reads, and without a quiet baseline that drift would have been filed as a keystroke landing. The astral-plane payload survives typing. SendInput forces a surrogate pair into two separate unicode events and the target reassembles it intact, read back through WM_GETTEXT so the check is independent of both the injection path and UIA. Notepad's edit control is unreachable from the managed client, and not merely unenumerated: TryGetCurrentPattern returns false for Text, Value and Scroll on the handle-resolved element, while the COM census sees the same window as a Document carrying all three. Hit-testing is the only sound visibility primitive of the three tested. The zero-size control is addressable by handle, enumerable by no walk, and returned by no point. A minimized window reports an empty rect at the top level while its descendants report real dimensions at the -32000 anchor, with IsOffscreen false throughout -- so neither emptiness nor IsOffscreen can gate occlusion, but ElementFromPoint correctly returns the occluder.
84 lines
No EOL
5.6 KiB
JSON
84 lines
No EOL
5.6 KiB
JSON
{
|
|
"probe": "05-interactions",
|
|
"question": "is TextPattern exposed on a classic Win32 Edit on Server 2019 at all, and does the managed stack agree with the COM stack about it",
|
|
"stack": "managed-System.Windows.Automation",
|
|
"scope": "app/provider",
|
|
"whyTwoLookups": "GetSupportedPatterns is not a reliable negative: it is answered by the client-side proxy that happens to be bound. Every row therefore also records TryGetCurrentPattern per pattern, which is the call the adapter would actually make. Both lookups are recorded because they disagree.",
|
|
"comCounterpart": "captures/08-uia3-com/census.json records the SAME notepad window through hand-declared UIA3 COM as one Document element carrying LegacyIAccessible, Scroll, Text, Text2 and Value. Any managed row below that reports Text absent is a client-stack divergence, not an absence of the provider.",
|
|
"p2o12Relevance": "2.0(3) text get/selection/caret/insert and P2-O12 both assume a Text-capable Edit. The WPF row shows what a full managed TextPattern surface supports; the notepad rows show what the real Win32 Edit gives the two client stacks.",
|
|
"rows": [
|
|
{
|
|
"target": "wpf-txtValue",
|
|
"stack": "managed-System.Windows.Automation",
|
|
"controlType": "Edit",
|
|
"className": "TextBox",
|
|
"supportedPatterns": [
|
|
"Scroll",
|
|
"SynchronizedInput",
|
|
"Text",
|
|
"Value"
|
|
],
|
|
"textPatternExposed": true,
|
|
"getText": {
|
|
"expectedShape": {
|
|
"utf16Units": 29,
|
|
"codepoints": 28,
|
|
"surrogatePairs": 1,
|
|
"replacementChars": 0,
|
|
"sha256Utf16": "5783f6f2168ecd35d4775d850bf880d7dca2b3d8a3a811f6893d4c82a089f441"
|
|
},
|
|
"observedShape": {
|
|
"utf16Units": 29,
|
|
"codepoints": 28,
|
|
"surrogatePairs": 1,
|
|
"replacementChars": 0,
|
|
"sha256Utf16": "5783f6f2168ecd35d4775d850bf880d7dca2b3d8a3a811f6893d4c82a089f441"
|
|
},
|
|
"exactMatch": true,
|
|
"note": "the value was set through ValuePattern and read back through TextPattern.DocumentRange.GetText - a cross-pattern read, not the same call returning its own argument"
|
|
},
|
|
"selection": {
|
|
"rangesBefore": 1,
|
|
"rangesAfter": 1,
|
|
"requestedUnits": 5,
|
|
"selectedShape": {
|
|
"utf16Units": 5,
|
|
"codepoints": 5,
|
|
"surrogatePairs": 0,
|
|
"replacementChars": 0,
|
|
"sha256Utf16": "9d17cf8d7d1b14ceec751b8f91702aaea1d386a4ed188d5e279cbe02394b18ca"
|
|
},
|
|
"matchesSubstring": true
|
|
},
|
|
"caret": {
|
|
"method": "a degenerate range (End collapsed onto Start) is Selected at character offset 4 and the selection is re-read",
|
|
"rangesAfter": 1,
|
|
"degenerate": true
|
|
},
|
|
"insert": {
|
|
"method": "TextPattern is read-only by contract; insertion is done through ValuePattern.SetValue and verified through the TextPattern read above",
|
|
"verified": true
|
|
}
|
|
},
|
|
{
|
|
"target": "notepad-edit",
|
|
"stack": "managed-System.Windows.Automation",
|
|
"lookup": "FindFirst(Descendants, ControlType=Document)",
|
|
"resolved": false
|
|
},
|
|
{
|
|
"target": "notepad-edit",
|
|
"stack": "managed-System.Windows.Automation",
|
|
"lookup": "AutomationElement.FromHandle(the Edit child HWND found with FindWindowEx)",
|
|
"resolved": true,
|
|
"controlType": "Pane",
|
|
"className": "Edit",
|
|
"supportedPatterns": [
|
|
|
|
],
|
|
"tryGetCurrentPattern_Text": false,
|
|
"tryGetCurrentPattern_Value": false,
|
|
"tryGetCurrentPattern_Scroll": false
|
|
}
|
|
]
|
|
} |