Forum Discussion

Arunachalam's avatar
Arunachalam
Occasional Contributor
6 years ago

Script code for Checkpoint validation

Hi,   The output log of "aqobject.checkproperty" either success or failure log can be stored in any external excel file by using script code. If any Script is available to share it.
  • Wamboo's avatar
    Wamboo
    6 years ago
    function storeLogInExternalFile(Object, Property, Condition, Value)) {
    	
    	var obj = {
    		testItemName: Project.TestItems.Current.Name;
    		testItemProperty: Property
    		testItemValue: Value
    		theValueIsCorrect : false;
    	}
    	
    	(aqObject.CheckProperty(Object, Property, Condition, Value)) ? obj.theValueIsCorrect = true  : obj.theValueIsCorrect = false;
    	
    	let dataToExcel = JSON.stringify(obj);
    	
    	// put this data into file
    }

    or store data into long string and put it into one cell in excel and into another one the name of the test item.

    Check in documentation that connection between TestComplete can accept JSON object as parameter. If yes you have good example.