Double click on row RadGridView (WPF)

4 posts, 0 answers
  1. Richard
    Richard avatar
    8 posts
    Member since:
    Mar 2015

    Posted 31 Mar Link to this post

    Hello,

    We are trying to open a detail screen that can be opened by double clicking a row in the grid (RadGridView). I have put in a wait step to overcome problems with building up the grid and changed the click step into an double click step. Still I am getting this error:

    Unable to locate element. Details: Attempting to find [Wpf] element using
    Find logic
     (Wpf): [AutomationId 'Exact' CellElement_0_2] AND [XamlTag 'Exact' textblock]
    Unable to locate element. Search failed!

    Up till now I was also unable to resolve the issue using the Resolve failure wizard.

    Any help will be appreciated.

    Richard

  2. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 05 Apr Link to this post

    Hello Richard,

    Thank you for your interest in Telerik Test Studio. 

    I am sorry to hear you encounter such difficulties. Based on the information you share I assume that the Find Logic for this element is not the correct and therefore the element could not be found. The problem is that the Automation Peers are enabled by default and when you are recording, the RadGridView generates Automation IDs at run-time for every StackPanel. However during execution these IDs are not generated and Test Studio fails to find the elements.

    To overcome this you need to turn off the creation of the automation peers as explained in this article. Also see this short video for more information.
     
    Let me know if the above information was helpful to you. 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. Richard
    Richard avatar
    8 posts
    Member since:
    Mar 2015

    Posted 07 Apr in reply to Elena Tsvetkova Link to this post

    I have followed the instructions in the article and put AutomationManager.AutomationMode = AutomationMode.Advanced; in my app.xaml.cs but that did not solve the issue. The setting for a AutomationMode was not set at all anywhere in the code so I presume it took the default already and that is Automationmode Advanced. Do you have any other sugestions how we can solve this issue? I will try to reproduce this problem on a very simple WPF app and let you know if I can preproduce it.

    Richard

  4. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 12 Apr Link to this post

    Hello Richard,

    The Automation Manager should be disabled to avoid generating Automation IDs.Please try to record and playback after disabling it and let me know of the result. 

    I would appreciate a sample application that reproduces the behavior in case we need to continue investigating. 

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