How to Delete a design step and add a new step to a Test using VBA Macros.
Im using the following code to remove the step but this is not working.
Dim folder As SubjectNode
Dim testF As TestFactory
Dim treeM As TreeManager
Set treeM = qcc.TreeManager
Set folder = treeM.NodeByPath(pFolder)
Set colTest = folder.TestFactory.NewList("")
'For Each test In colTest
Set tlist = folder.FindTests(Tcname)
For Each test In tlist
If test.Name = Tcname Then
found = True
' test.RemoveItem
End If
Set DSFactory = test.DesignStepFactory
Set StepList = DSFactory.NewList("")
DSFactory.RemoveItem (StepList.Item(1).ID)
When the line "DSFactory.RemoveItem (StepList.Item(1).ID)" is executed the control comes out of the block.
Any siggestions pls.
Thanks,