Kendo Tree

6 posts, 0 answers
  1. Naga
    Naga avatar
    15 posts
    Member since:
    Apr 2012

    Posted 28 Jun 2012 Link to this post

    Hello:
            I am working with an application that has a kendo Tree.Can you please help me in clicking on the child nodes of a tree and then performing other options.Here basically i have tree with many child nodes and then after i expand a child then i wil have sub nodes.So i have to navigate to this position and then i will have edit icons beside that child node which i have to click.Below are the detailed navigation steps

    Expand the dynamic tree for the first node
    Under this click on the edit icon for the first child

    Attached is the sample screenshot for your refernce.
    Please let me know how this can be achieved.
  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 03 Jul 2012 Link to this post

    Hello Naga,

    Here's a sample code created against this Kendo TreeView demo site
     
    //Get the TreeView object
    KendoTreeView treeView = ActiveBrowser.Find.ById<KendoTreeView>("treeview");
     
    //Get the first root node
    KendoTreeNode node = treeView.AllNodes[0];
     
    //Expand the node
    node.Expand();
     
    //Get the first child node
    KendoTreeNode childNode = node.Find.AllByAttributes<KendoTreeNode>("class=k-item").FirstOrDefault();
     
    //Select the child node
    childNode.Select();

    Once you have the desired child node element, it should be easy for you to exemine the DOM structure of that element and find the Edit button contained in it.

    Let me know if you need further assistance on this.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Naga
    Naga avatar
    15 posts
    Member since:
    Apr 2012

    Posted 16 Jul 2012 Link to this post

    Hello,
        When i try to get the nodenames of the nodes,it is just returning Name and Occupation(referring the diagram in first post). But when i try to get the count it is giving 5. How can i extract the nodenames of remaining nodes??

    Thanks,
    Naga.
  4. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 16 Jul 2012 Link to this post

    Hello Naga,

    Here's a sample code that will take the names off all nodes from the AllNodes collection and write them into the test log:
     
    //Get the TreeView object
    KendoTreeView treeView = ActiveBrowser.Find.ById<KendoTreeView>("treeview");
     
    foreach (KendoTreeNode node in treeView.AllNodes)
    {
        Log.WriteLine(node.NodeName);
    }

    See this video for more information.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  5. Naga
    Naga avatar
    15 posts
    Member since:
    Apr 2012

    Posted 16 Jul 2012 Link to this post

    Hello :
      I have developed the code in the similar way,however there are few nodes whose name is not displayed in the result log.Also the edit icon is binded within this node so how will i get the access to this edit icon and click on that.

    Regards,
    naga
  6. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 20 Jul 2012 Link to this post

    Hello Naga,

    I am sorry for the delay in getting back to you on this.

    I've been informed that you already discussed the first problem during the demo session with Stoich. And he explained to you that in some cases you need to expand the node in order to load the elements contained in it into the DOM tree.

    For the second problem I need to see how the edit button is implemented, so I can assist you in writing the code. Would it be possible to provide access to your application or point me to a publicly accessible application similar to yours?
     
    Also, we just released Service Pack 2 yesterday. It includes a lot of improvements related to our Kendo UI control wrappers. You can download it from your Telerik account here: Public URL

    Kind regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top