how to create XamlPath for WPF applicaiton

2 posts, 0 answers
  1. Kanwarjit
    Kanwarjit avatar
    3 posts
    Member since:
    Jul 2015

    Posted 06 Dec 2016 Link to this post

    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

  2. Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 09 Dec 2016 Link to this post

    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
     
Back to Top