Indexing into an element collection on the Find Element Settings Page

4 posts, 0 answers
  1. Swathi
    Swathi avatar
    13 posts
    Member since:
    Feb 2015

    Posted 08 May 2015 Link to this post

    Hello

     

     I have the following Xaml Path

     

    /adornerdecorator[0]/adornerlayer[0]/backstageadorner[0]/backstage[0]/border[0]/popupcontentdecorator[0]/dockpanel[0]/border[1]/contentpresenter[name=PART_SelectedContentHost]/opendocumentview[0]/border[0]/contentpresenter[0]/grid[0]/contentcontrol[name=FindEntity]/contentpresenter[0]/findentityview[0]/border[0]/contentpresenter[0]/grid[name=FindEntity]/contentcontrol[name=Search]/contentpresenter[0]/opendocumentsearchview[0]/border[0]/contentpresenter[0]/grid[0]/contentcontrol[name=TypeFacets]/contentpresenter[0]/searchtypefacetsview[0]/border[0]/contentpresenter[0]/stackpanel[0]/listbox[name=ResultsView]/elementchrome[name=chrome]/scrollviewer[0]/grid[0]/scrollcontentpresenter[name=PART_ScrollContentPresenter]/itemspresenter[0]/stackpanel[0]/listboxitem[3]/border[name=Bd]/contentpresenter[0]/grid[0]/textblock[0]

    In the attached Find-Element.png I am trying to modify the settings to Find this element with the text content  "Formulas"

    So far I have come up with
    \\listbox[name=ResultsView]\\scrollcontentpresenter[name=PART_ScrollContentPresenter]\\listboxitem[3]\\textblock[0]

     

    I am unable to determine these two XamlTags

    1) listboxitem[3]

    2) textblock[0]

    So how to index into an element collection on the Find Element Settings Page?

  2. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 13 May 2015 Link to this post

    Hello Swathi,

    I do not know what you are trying to do, but you are not doing it in the proper way.

    Simply remove the filters you've added and click on the TextContent suggestion on the left.

    Regards,

    Ivaylo
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Swathi
    Swathi avatar
    13 posts
    Member since:
    Feb 2015

    Posted 13 May 2015 in reply to Ivaylo Link to this post

    Hello Ivaylo

    I am trying to avoid using TextContent as a part of find element. I am exploring alternate logic to find elements. I believe avoid textcontent in search logic would make tests more robust.

    In that context can you please take a look at my original question and help me with a solution?

  4. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 18 May 2015 Link to this post

    Hello Swathi,

    Regarding the original question, you can use only the suggestions provided on the left side. For example you can insert the XamlPath instead of breaking this like shown in the screenshot. This will not work properly as you already noticed.
    If the filters suggested are not sufficient you can try to do something else and use chained find expressions as shown in this article.

    If you are still experiencing difficulties you can provide access to the tested application and more information for the element you are building the find logic for and we will be happy to assist you further.

    Regards,
    Ivaylo
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top