sridhar249
2 years agoOccasional Contributor
How to capture output of running a TestedApp
function runTestedApp(){
let testAppIndex = TestedApps.Add("C:\\Program Files\\SmartBear\\ReadyAPI-3.43.1\\bin\\agentavailability.bat")
let testApp = TestedApps.Items(testAppIndex)
testApp.Params.SimpleParams.CommandLineParameters = "-a 12.14.154.102:1234";
let result = testApp.Run()
Log.Message(result)
}
When i run the above method, i am hoping to capture the output from running the testedapp. The following statement does not capture the output. It simply runs the app.
let result = testApp.Run()
Please help.
The Run method returns the Process object and not the output.
See the example codes shown in Running PowerShell Scripts From TestComplete, section Run PowerShell Script and Get the Result as Text