Reputation: 93
I am testing the REST api for download file, so when I am executing GET method using requests.py in robot framework it gives PDF file which i need to create as local file.
Please help me how to create the local PDF file am getting as a response of GET in robot framework.
Thanks
Upvotes: 0
Views: 4078
Reputation: 93
Thanks for reply.. Actually instead of "Create File" I used Create Binary File"
Upvotes: 0
Reputation: 6935
When you do a GET, it should be something like:
${response} = requests.get('https://your_url_with_PDF')
Then if you want to store the response in a file, just import OperatingSystem Robot Framework library and do:
Create File your_path ${response.content}
Upvotes: 0