Reputation: 21
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
Upvotes: 1
Views: 8955
Reputation: 1
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
Upvotes: 0
Reputation: 191
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
Upvotes: 1
Reputation: 21
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.
Upvotes: 1
Reputation: 76
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
Upvotes: 0