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

Indexing into an element collection on the Find Element Settings Page

3 Answers 27 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Swathi
Top achievements
Rank 1
Swathi asked on 08 May 2015, 05:47 PM

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?

3 Answers, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 13 May 2015, 12:30 PM

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!
0
Swathi
Top achievements
Rank 1
answered on 13 May 2015, 07:17 PM

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?

0
Ivaylo
Telerik team
answered on 18 May 2015, 11:57 AM
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!
Tags
General Discussions
Asked by
Swathi
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
Swathi
Top achievements
Rank 1
Share this question
or