Forum Discussion
ChristopheC
15 years agoContributor
Hi Allen & Brian,
attachment, here is a sample application QT version 4.6.2.0 to see how to accomplish my task.
Aim is to analyze QTreeWidget (manual checkpoint), here's how I analyze my first element in sample application :
Item1_Colonne1 = NameMapping.Sys.testComplete.MainWindow.centralWidget.trw.wItems.Item(0).Items.Item(0).Text(0)
If ( Item1_Colonne1 = "Sous-Elément 1.1") Then
Log.Message("Item1_Colonne1 OK=" & Item1_Colonne1)
Else
Log.Error("Item1_Colonne1 Not OK=" & Item1_Colonne1)
End If
Item1_Colonne2 = NameMapping.Sys.testComplete.MainWindow.centralWidget.trw.wItems.Item(0).Items.Item(0).Text(1)
If ( Item1_Colonne2 = "Texte") Then
Log.Message("Item1_Colonne2 OK=" & Item1_Colonne2)
Else
Log.Error("Item1_Colonne2 Not OK=" & Item1_Colonne2)
End If
my second element containing an icon, can you help me in vbscript.If it is not possible to retrieve the icon, is it possible to recover if Item2_Colonne2 is empty or not ?
Item2_Colonne1 = NameMapping.Sys.testComplete.MainWindow.centralWidget.trw.wItems.Item(0).Items.Item(1).Text(0)
If ( Item2_Colonne1 = "Sous-Elément 1.2") Then
Log.Message("Item2_Colonne1 OK=" & Item2_Colonne1)
Else
Log.Error("Item2_Colonne1 Not OK=" & Item2_Colonne1)
End If
Item2_Colonne2 = .... ?
Best regards,
Christophe
attachment, here is a sample application QT version 4.6.2.0 to see how to accomplish my task.
Aim is to analyze QTreeWidget (manual checkpoint), here's how I analyze my first element in sample application :
Item1_Colonne1 = NameMapping.Sys.testComplete.MainWindow.centralWidget.trw.wItems.Item(0).Items.Item(0).Text(0)
If ( Item1_Colonne1 = "Sous-Elément 1.1") Then
Log.Message("Item1_Colonne1 OK=" & Item1_Colonne1)
Else
Log.Error("Item1_Colonne1 Not OK=" & Item1_Colonne1)
End If
Item1_Colonne2 = NameMapping.Sys.testComplete.MainWindow.centralWidget.trw.wItems.Item(0).Items.Item(0).Text(1)
If ( Item1_Colonne2 = "Texte") Then
Log.Message("Item1_Colonne2 OK=" & Item1_Colonne2)
Else
Log.Error("Item1_Colonne2 Not OK=" & Item1_Colonne2)
End If
my second element containing an icon, can you help me in vbscript.If it is not possible to retrieve the icon, is it possible to recover if Item2_Colonne2 is empty or not ?
Item2_Colonne1 = NameMapping.Sys.testComplete.MainWindow.centralWidget.trw.wItems.Item(0).Items.Item(1).Text(0)
If ( Item2_Colonne1 = "Sous-Elément 1.2") Then
Log.Message("Item2_Colonne1 OK=" & Item2_Colonne1)
Else
Log.Error("Item2_Colonne1 Not OK=" & Item2_Colonne1)
End If
Item2_Colonne2 = .... ?
Best regards,
Christophe