Rest API- How to save excel file

17 views
Skip to first unread message

Nitin Agrawal

unread,
Sep 24, 2021, 5:30:41 PM9/24/21
to qaf users
Hi,

I am currently using QAF for rest web services testing. can you please let me know how can i achieve below-

I have API which gives response and that need to save as xlsx file.
i.e. when I ran in postman then after running it then I download file via "save Response->Save to a file->then popup window open to save file at local"

Question: How can I achieve above via code?

Regards,
Nitin

cjayswal

unread,
Sep 28, 2021, 12:24:17 AM9/28/21
to qaf users
You can use downloadFileFromResponse. For example

import static com.qmetry.qaf.automation.step.WsStep.*
...
ClientResponse response = userRequests("download.file.req");
 

downloadFileFromResponse("myfile.xslx", response);



શુક્રવાર, 24 સપ્ટેમ્બર, 2021ના રોજ 02:30:41 PM UTC-7 વાગ્યે nitin123...@gmail.com દ્વારા આમ લખવામાં આવ્યું હતું:
Reply all
Reply to author
Forward
0 new messages