Hi,
I am trying to automate an application using Ranorex.
I am facing a small problem when I am working with Tree Object.
Here is the scenario...
A tree is looks like below..
ParentNode1
--ChildNode1
---SubChildNode 1
---SubChildNode 2
|
|
|
---SubChildNode n
|
|
|
|
|
ParentNode N
--ChildNode N
---SubChildNode 1
--C1
--C2
|
|
|
--Cn
I want to write a generic function for this so that how many child node I pass as parameter it should select that particular node
E.g: If I want to select 'C1' under 'SubChildNode 1' then I can able to select that node & in second case if I want to select want to select 'SubChildNode 1' under 'ChildNode1' under 'ParentNode1' I can able to select that also.
If we look both 'ParentNode1' & 'ParentNode N' levels count are different.
'ParentNode1' has 3 levels whereas 'ParentNode N' has 4 levels.
Pls repond me ASAP as we have an urgent requirement regading this.
TreeNode Issue
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: TreeNode Issue
Hello,
I am afraid that I didn't quite catch that.
Why don't you use the RxPath to recognize the elements?
If you want to get all child nodes from a specific tree node you can use the method DescendatItems for example.
Kind regards,
Bernhard
I am afraid that I didn't quite catch that.
Why don't you use the RxPath to recognize the elements?
If you want to get all child nodes from a specific tree node you can use the method DescendatItems for example.
IList<TreeItem> treeList = ParentTreeNode.DescendantItems;Please explain if I understood something wrong.
Kind regards,
Bernhard