Repository navigation
Conversation
Include current-dispatcher presentation sources and deduplicate overlapping global query roots. Preserve explicit subtree scope and add generic popup, dropdown, tooltip, ambiguity and dispatcher regression coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Global element discovery starts from Application.Current.Windows. WPF ContextMenu, Popup, dropdown and ToolTip content can live in separate PresentationSource roots without being reachable through a window's visual tree. Dynamically created context menus are a standard reproduction; no custom controls or application-specific metadata are needed.
Changes
Regression coverage
Seven new cases cover dynamically created context menus, matching by text/type/AutomationId, wait lookup, stable selectors, asynchronous close, overlapping roots/result limits, standalone/disposed HwndSource roots, foreign dispatchers, ComboBox dropdowns, ToolTips and ambiguous IDs across detached roots.
The original root collector returned no matching dynamically created context-menu content and did not discover standalone HwndSource roots; the new tests reproduce these failures before the fix.
Validation
Passed, 0 warnings / 0 errors on the final incremental build; Inspector payloads built for net472, net48 and net8.0-windows.
45 passed, 1 skipped. The external runtime/architecture/injection matrix requires its own configured runner and was not executed.
262 passed.
Passed.