I'm trying to update a test case status using VBScript for a concrete selected test cases, however I'm unable to identify the selected (highlighted test cases) rows.
There are features in QC like "export selected" or "report selected"... which mean it is possible to identify selected items...
Can someone help me how to identify in VBA or VBS the selected items in QC and update the status only for them?
Here is the fragment of code where I'm stacked in:
Sub change_status()
'code with connections etc
'start iterating through all test cases
For Each TestCase In TestSetTestsList
'identify the test case was selected/highlighted
If TestCase.Field("selected") = True Then
TestCase.Field("TS_STATUS") = "passed" '"failed" etc
TestCase.Post
TestCase.Refresh
End If
Next
MsgBox ("The status successfully updated for all selected test cases")
End Sub
The attached image can help you understand what I mean by "selected test case" or "selected item".