This is a migrated thread and some comments may be shown as answers.
Kendo Tree
5 Answers 55 Views
This is a migrated thread and some comments may be shown as answers.
Naga
Top achievements
Rank 1
Naga asked on 28 Jun 2012, 01:40 PM
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.

5 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 03 Jul 2012, 02:13 PM
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
0
Naga
Top achievements
Rank 1
answered on 16 Jul 2012, 01:57 PM
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.
0
Plamen
Telerik team
answered on 16 Jul 2012, 03:57 PM
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
0
Naga
Top achievements
Rank 1
answered on 16 Jul 2012, 05:08 PM
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
0
Plamen
Telerik team
answered on 20 Jul 2012, 07:31 AM
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
Asked by
Naga
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Naga
Top achievements
Rank 1
Share this question
or