Merging elements in the element repository in WPF tests

6 posts, 0 answers
  1. Rory
    Rory avatar
    16 posts
    Member since:
    Jun 2011

    Posted 19 Mar Link to this post

    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?

  2. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    253 posts

    Posted 23 Mar Link to this post

    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!
  3. Rory
    Rory avatar
    16 posts
    Member since:
    Jun 2011

    Posted 23 Mar in reply to Elena Tsvetkova Link to this post

    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.

  4. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    253 posts

    Posted 25 Mar Link to this post

    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!
  5. Rory
    Rory avatar
    16 posts
    Member since:
    Jun 2011

    Posted 27 Mar in reply to Elena Tsvetkova Link to this post

    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).

  6. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    253 posts

    Posted 28 Mar Link to this post

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