Export Test Cases From Qc To Excel Using Vbscript

Export

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'.

Export Test Cases From Qc To Excel Using Vbscript

Vbscript To Export Test Cases From Qc To Excel

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 changestatus '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('TSSTATUS') = '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'. And here is the solution I found: Function TestSetCanRemoveTests(Tests) result = msgbox ('Would you like to update the status?'