You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
I am very new to testing / developing. I am currently testing a REST API. In Postman I send a POST request by specifying parameters and uploading a file using form-data in the body. My request always succeeds. However, when I try to translate this into Robot Framework (using the Requests Library), I
I am posting my code below. I have been trying to resolve this issue for a while now. Any help in the right direction would be much appreciated!
Create Session alias ${uri}
${file_name}= Get Binary File Test.png
${headers}= Create Dictionary Accept=plain/text Content-Type=multipart/form-data
${data}= create dictionary asset=${file_name}
${resp}= post request alias /api/insertFile data=${file_name} headers=${headers}
Should Be Equal As Strings ${resp.status_code} 200
log to console ${resp.content}
log to console ${resp.headers}
It is giving me 200 always in server log also expected response is true but getting false every time. Although the same API is working perfectly in the Postman tool.
Attached server log
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am very new to testing / developing. I am currently testing a REST API. In Postman I send a POST request by specifying parameters and uploading a file using form-data in the body. My request always succeeds. However, when I try to translate this into Robot Framework (using the Requests Library), I
I am posting my code below. I have been trying to resolve this issue for a while now. Any help in the right direction would be much appreciated!
Create Session alias ${uri}
${file_name}= Get Binary File Test.png
${headers}= Create Dictionary Accept=plain/text Content-Type=multipart/form-data
${data}= create dictionary asset=${file_name}
${resp}= post request alias /api/insertFile data=${file_name} headers=${headers}
Should Be Equal As Strings ${resp.status_code} 200
log to console ${resp.content}
log to console ${resp.headers}
It is giving me 200 always in server log also expected response is true but getting false every time. Although the same API is working perfectly in the Postman tool.
Attached server log
The text was updated successfully, but these errors were encountered: