set StopOnError via script

Originally posted by jromie on January 28, 2016

I am trying to write a simple script that runs each time a project starts. It is to loop through the test items and shut off the StopOnError property.

Here is the code I have right now that doessn’t work (JScript):

var i;

for(i = 0; i < Project.TestItems.ItemCount; i++) {

Project.TestItems.TestItem(i).StopOnError = 0;

}

This throws and error: “Invalid number of arguments or invalid property assignment”

Is this specific task even possible?

Originally posted by djadhav on January 28, 2016

This article https://support.smartbear.com/viewarticle/68453/ describes StopOnError as a Read Only property hence I believe you cannot change it’s value from script.

Originally posted by jromie on January 28, 2016

I saw that, but figured I’d ask anyways. Thanks!