0

I have requirement to delete run instance in ALM though automation scripts using selenium. Please note that I have used jacob lib to connect to ALM and update the test steps automatically in ALM. Delete is not working and I am getting error as "com.jacob.com.ComFailException: Can't map name to dispid: Delete".

Can somebody go through my code and let me know what is wrong.

Dispatch runF = Dispatch.get(testItem,"RunFactory").toDispatch();
Dispatch runAA = Dispatch.call(runF, "NewList","").toDispatch();

Variant runCount = Dispatch.get(runAA, "Count");

System.out.println("Run Count :"+ runCount);

int runsCountInt = runCount.toInt();

for(int run=1; run<=runsCountInt; run++){

Dispatch runItem = Dispatch.call(runAA, "Item", new 
Variant(run)).toDispatch();


Variant runName = Dispatch.get(runItem,"Name");
System.out.println("Run Name: "+runName);                            

Dispatch.call(runItem, "Delete");

***Please note that I am able to get the run instance but unable to delete it using -Dispatch.call(runItem, "Delete")....

Manasa
  • 11
  • 4

1 Answers1

0

You have to use the RunFactory' RemoveItem Method. Run Objects do not have a Delete Method. More info in the official doc

Bela Tamas Jozsa
  • 714
  • 5
  • 10