Quantcast
Channel: Quality Center / ALM Practitioners Forum topics
Viewing all articles
Browse latest Browse all 5491

How to delete a step to existing test Case and add new one using VBA

$
0
0

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,


Viewing all articles
Browse latest Browse all 5491

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>