This is a migrated thread and some comments may be shown as answers.

how to create XamlPath for WPF applicaiton

1 Answer 39 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kanwarjit
Top achievements
Rank 1
Kanwarjit asked on 06 Dec 2016, 03:54 PM

Hi,

I wan to use Telerik Test Framework for WPF UI automation.

To find the controls I am using:

 return Get<ArtOfTest.WebAii.Controls.Xaml.Wpf.TextBlock>(
                            "XamlTag=contentpresenter",
                            "name=SelectedTabContent",
                            "|",
                      @"XamlPath=/grid[name=ContentPanel]/ribbonscrollviewer[name=TabItemsScrollViewer]/grid[0]/contentpresenter[name=Content]/itemspresenter[0]/ribbongroupspanel[0]/radribbongroup[0]/grid[0]/groupchrome[name=ExpandedChrome]/grid[0]/grid[name=Tray]/contentcontrol[0]/contentpresenter[0]/radribbongroup[automationid=GroupName]/grid[0]/groupchrome[name=ExpandedChrome]/grid[0]/grid[name=Tray]/contentcontrol[0]/contentpresenter[0]/textblock[0]");

Could you please let me know from where I can generate the XamlPath used above, or for that we need to use the paid functionality of DOM explorer?

Thanks,

Kanwar

1 Answer, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 09 Dec 2016, 11:38 AM
Hello Kanwarjit,

There are a lot of free software which you can use to explore the DOM tree of your running WPF application.

Snoop is one of them.

Hope that helps.

Regards,
Boyan Boev
Telerik by Progress
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
Kanwarjit
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Share this question
or