Forum Discussion
ChristopheC
15 years agoContributor
Hi Allen,
here is the final code that allows me to do whatever I want :
Key_IconeSite = 12884901888 'QIcon_cacheKey expected
Set qtw = NameMapping.Sys.testComplete.MainWindow.centralWidget.trw
Key_Icone = qtw.QTreeWidget_currentItem().QTreeWidgetItem_icon(1).QIcon_cacheKey()
Call qtw.ClickItem("Elément 1|Sous-Elément 1.2", "Colonne 2")
If(qtw.QTreeWidget_currentItem().QTreeWidgetItem_icon(1).QIcon_isNull()) Then
Log.Message "An icon is not set"
Else
Log.Message "An icon is set"
If (CCur(Key_Icone) = CCur(Key_IconeSite) ) Then
Log.Message "Icon Site OK"
Else
Log.Error "Icon Site Not OK"
End If
End If
thank you for your help.
Best regards,
Christophe
here is the final code that allows me to do whatever I want :
Key_IconeSite = 12884901888 'QIcon_cacheKey expected
Set qtw = NameMapping.Sys.testComplete.MainWindow.centralWidget.trw
Key_Icone = qtw.QTreeWidget_currentItem().QTreeWidgetItem_icon(1).QIcon_cacheKey()
Call qtw.ClickItem("Elément 1|Sous-Elément 1.2", "Colonne 2")
If(qtw.QTreeWidget_currentItem().QTreeWidgetItem_icon(1).QIcon_isNull()) Then
Log.Message "An icon is not set"
Else
Log.Message "An icon is set"
If (CCur(Key_Icone) = CCur(Key_IconeSite) ) Then
Log.Message "Icon Site OK"
Else
Log.Error "Icon Site Not OK"
End If
End If
thank you for your help.
Best regards,
Christophe