Question

Is there a way to capture and store (or write to a file) the values returned in the Response? (Checkpoint values)

Using HP UFT 11.52

Thanks,

Lynn

Was it helpful?

Solution

I figured it out. In UFT API under Standard Activities, there are File function modules including "Write to File". I added the module to the test, set the path and other properties, passed the variable to the file and it worked! Couldn't be easier.

OTHER TIPS

I mentioned this on my other answer , you can also write it programatically if you have dynamic array response please refer below: https://stackoverflow.com/a/28012383/3972994

After running a test, in the test folder, you can find a Snapshots/LastIteration directory. In it you can find the return value for each step saved in a txt file. Pay attention that if you data drive the step, only the last iteration will be saved to file. However, in the Test's log (Test dir/Log/vtd_user.log) you can find all the iterations persisted

Thanks, Yossi

You do not need to use the standard activities if you do this

var iResponse = this.Activity.responsebody;
System.IO.File.WriteLines(@"directorypath&FileName);

the above will write the response to the file and rewrite it for every run

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top