Forum Discussion
ChristopheC
16 years agoContributor
Hi David,
when I use the following code :
Sub Main
MyTree = Aliases.testComplete5.MainWindow.centralWidget.treeWidget.wItems.Item(0).Text(0)
MsgBox MyTree
End Sub
MsgBox return "Element1" -> OK
and when I use the following code :
Sub Main
MyTree = Aliases.testComplete5.MainWindow.centralWidget.treeWidget.wItems.Item(0).Items.Item(0).Text(0)
MsgBox MyTree
End Sub
MsgBox return "sousElement1.1" -> OK
Thank you.
1) Is it possible to check in only once the entire contents of my object "treeWidget" or should I use "For" loop ?
2) I can retrieve the number of elements in the current node :
MyTree = Aliases.testComplete5.MainWindow.centralWidget.treeWidget.wItems.Count
Is it possible to returns the number of sub elements in a element ?
Best
regards,
Christophe
when I use the following code :
Sub Main
MyTree = Aliases.testComplete5.MainWindow.centralWidget.treeWidget.wItems.Item(0).Text(0)
MsgBox MyTree
End Sub
MsgBox return "Element1" -> OK
and when I use the following code :
Sub Main
MyTree = Aliases.testComplete5.MainWindow.centralWidget.treeWidget.wItems.Item(0).Items.Item(0).Text(0)
MsgBox MyTree
End Sub
MsgBox return "sousElement1.1" -> OK
Thank you.
1) Is it possible to check in only once the entire contents of my object "treeWidget" or should I use "For" loop ?
2) I can retrieve the number of elements in the current node :
MyTree = Aliases.testComplete5.MainWindow.centralWidget.treeWidget.wItems.Count
Is it possible to returns the number of sub elements in a element ?
Best
regards,
Christophe