Skip to content

I cannot find element in Main Window of WPF using any inspect tool #1757

@shery-k

Description

@shery-k

I have a desktop app with only one main window implemented in WPF . it is an area in main window( included search textbox that i am trying to find element for automation). this element comes from another view model binded to the main view model. i am using winapp driver framework, and code in C#
please note in binded xmal file i can see AutoamtionID but inspect tools ( inspect.exe, UI recorder, Accessibility tool) cannot find element at all. what should i do? thanks
below snippet showing how addressed in main window xaml file:
<TabItem x:Uid="TabItem_1" Header="MyTab" AutomationProperties.HelpText="Tab for accessing workflow" AutomationProperties.AutomationId="tab1"> <packageViews:PackageExplorerView x:Uid="packageViews:PackageExplorerView_1"/> </TabItem>

from UI Recorder: Xpath
"/Pane[@classname="#32769"][@name="Desktop 1"]/Window[@name="Main Window"][starts-with(@AutomationId,"wpftheme:ThemeWindow_")]/Tab[starts-with(@AutomationId,"TabControl_")]"
Note: no matter on what element i clicked i got the above xpath

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions