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

Merging elements in the element repository in WPF tests

5 Answers 94 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rory
Top achievements
Rank 1
Rory asked on 19 Mar 2016, 03:11 PM

Greetings -

I've reviewed the help document "Merge Page Nodes" in order to merge elements in our WPF tests. After reproducing the behavior therein for Web tests, I'm at a loss as to how to apply this to WPF tests, since "Compare Mode" doesn't exist for WPF pages.

What I want to do is to merge all the elements which have the same Find Expression across all our WPF tests in the same project. How is this possible?

5 Answers, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 23 Mar 2016, 07:18 AM
Hi Rory,

Thank you for contacting us. 

The elements in a WPF test are organized in sections divided by application and captions under that application (the different windows in the application). Test Studio merges automatically all elements that have the same find logic under each caption. Captions could be merged but to provide you best solution in that particular case your project will be required.

Would it be possible to send your project? Please note that the project itself will be enough, no need to access the application. 

Hope to hear from you soon. 

Regards,
Elena Tsvetkova
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Rory
Top achievements
Rank 1
answered on 23 Mar 2016, 07:35 AM

Thanks for the reply, Elena.

It appears that the expected behavior is not observed. When I create an element with the same find logic, a new element is created with a numeral appended. For example, if I have an element named "PriceTextbox" with find expression = "XamlTag=Textbox,Name=Price" and then use the Edit Element dialog to set another element, which started with a different (and undesirable) find expression to the same expression as "PriceTextbox", when I save the changes, a new element with the name "PriceTextbox0" is created with the same find expression as "PriceTextbox". The desired, unobserved behavior is that the edited element is merged with "PriceTextbox".

I will send an example project with the resulting duplicated element.

0
Elena
Telerik team
answered on 25 Mar 2016, 11:31 AM
Hi Rory,

Thanks a lot for the detailed description. It would be of great interest to see a sample project reproducing that behavior. 

Looking forward to hearing from you. 

Regards,
Elena Tsvetkova
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Rory
Top achievements
Rank 1
answered on 27 Mar 2016, 05:21 AM

Hi Elena -

I've tried to reproduce this error in a new, simpler WPF project, but merge appears to work in all of the smaller projects I've made. However the behavior is still incorrect in our larger project. I've installed Test Studio on a different machine and the behavior is even different here than on the originally observed machine. I'm not able to share this project here in the forums (I'll open a support ticket with it however), but attached are two screen shots showing the currently observed behavior where there are 2 elements with the same name (before the element name was similar, but not the same).

0
Elena
Telerik team
answered on 28 Mar 2016, 01:56 PM
Hello Rory,

Thank you for your cooperation. 

Based on all shared information we were able to identify the root cause. The elements that do not behave as expected have a sort of generic control type. Such a control type appears when an element is manually added and then mapped but there is no translator available for its type. It should be first edited to a valid WPF control type and then merged to an existing element. To change the control type use the first field in the step properties pane. Attached are two screenshots showing the valid and the generic control type. 

Let me know if this information helps you resolve the misbehavior you encounter. 

Regards,
Elena Tsvetkova
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Rory
Top achievements
Rank 1
Answers by
Elena
Telerik team
Rory
Top achievements
Rank 1
Share this question
or