locked
TreeView in codedui does records all its windows RRS feed

  • Question

  • Hi,

    We have recorded the treeview in windowapplication using coded ui and it works fine while recording but while playback it does not run properly i.e., the node in the tree view is not clicked.

    Also, the window declaration for the tree view node is not captured properly.


    Error log snippet:

    QTAgent32.exe, Playback - [WARNING] Internal warning: Window Not Found: [VisibleOnly]ControlType='Window' && Name='Elite Enterprise 3.10  son_db_qa310_ga ' && ClassName='ThunderRT6MDIForm'

                       

     public class UIEliteEnterprise310soWindow : WinWindow
        {

            public UIEliteEnterprise310soWindow()
            {
                #region Search Criteria
                this.SearchProperties[WinWindow.PropertyNames.Name] = "Elite Enterprise 3.10  son_db_qa310_ga ";
                this.SearchProperties[WinWindow.PropertyNames.ClassName] = "ThunderRT6MDIForm";
                this.WindowTitles.Add("Elite Enterprise 3.10  son_db_qa310_ga ");
                #endregion
            }

    Actually we need to do this in treeview:  A->B->C->C1 here i need to click on C1 but the CodedUI records the window declarations only for A and C1 but not for B and C and due to this it failed to click on C1 which resides inside B->C.

    Please help us to resolve the issue.

    Thanks in Advance

    Selvaraj C



    Selvaraj

    Thursday, August 1, 2013 12:40 PM

All replies

  • Hi Selvaraj,

    Actually we need to do this in treeview:  A->B->C->C1 here i need to click on C1 but the CodedUI records the window declarations only for A and C1 but not for B and C and due to this it failed to click on C1 which resides inside B->C

    I doubt that it is related to the parent control, I mean that it will generate this issue when the search failed before it reached to the target control. We would write the hand-coding coded UI test.

    Reference:

    http://blogs.msdn.com/b/tapas_sahoos_blog/archive/2011/04/22/illustration-of-coded-ui-test-playback-failure-quot-search-may-have-failed-at-controlx-as-it-may-have-virtualized-children-quot.aspx

    http://blogs.msdn.com/b/dpksinghal/archive/2011/09/28/how-to-test-deep-hierarchy-controls-using-coded-ui-test-in-wpf.aspx

    Have a nice day,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Sunday, August 4, 2013 7:26 AM
    Moderator
  • Hi,

    We tried by adding the

    <add key="MaxLevelsForItemContainer" value="3"/> in CodedUITestBuilder.exe.config file but it still fails to click the C1 in the above structure we said earlier.

    And please let us know on how to click the sub tree-item in treeview.

    Thanks in Advance

    Selvaraj C


    Selvaraj

    Tuesday, August 6, 2013 5:22 AM
  • Hi Selvaraj,

    Glad to receive your reply.

    <add key="MaxLevelsForItemContainer" value="3"/> in CodedUITestBuilder.exe.config file but it still fails to click the C1 in the above structure we said earlier.

    Actually this issue is used to test the specific WPF app when we couldn’t see the specific parent controls in the Coded UI test builder, so you would make sure that whether it is the WPF app, we would make sure that we use the VS2010, and we just could see the specific parent controls with the UISpy tool.

    If it doesn’t meet the above requirements, like the first blog provided in my first reply, we would hand code this test and add all virtualized controls to the search hierarchy.

    http://blogs.msdn.com/b/tapas_sahoos_blog/archive/2010/12/28/decoding-the-coded-ui-test-playback-failure-quot-search-may-have-failed-at-controlx-as-it-may-have-virtualized-children-quot.aspx

    If still no help, you could share us a simple sample, we would hand coding a coded UI test for this specific App.

    Best regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, August 6, 2013 9:11 AM
    Moderator
  • Hi Jack,

    Actually the application which we are trying to automate is a VB application.

    PFA UIMap

    In line no.60 in  the attached UIMap file, we tried to perform either single/double click on the tree item node. But it is failed at this point.

    Please let us know the hand code to click on the tree item node.

    Thanks in Advance,

    Selvaraj C


    Selvaraj

    Tuesday, August 6, 2013 11:51 AM
  • Hi Selvaraj,

    Sorry for that it is hard for us to repro this issue if you just share us a test project, would you mind sharing us the VB app which you want to test or a simple sample? Thanks for your understanding.

    Best regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, August 7, 2013 9:27 AM
    Moderator
  • Hi Jack Zhai,

    PFA the sample tree view application in VB Sample Tree Item App in VB

    In the attached app, the requirement is to click the jurisdiction option in tree view item and we were able to record the same but during playback it fails to do the same

    Please help us to make it work

    Thanks

    Selvaraj C


    Selvaraj

    Tuesday, August 20, 2013 7:29 AM
  • Hi Selvaraj,

    Sorry for that I couldn’t open the .exe file in my side. Maybe you share me the project folder and all files. I will try to open/run it in my VS IDE.

    If there's any concern, please feel free to let me know.

    Best Regards,


    Jack Zhai[MSFT]
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, August 21, 2013 7:40 AM
    Moderator