SelectFile() Not working as expected in Chrome #20274
Unanswered
baguilar-work
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Ive been trying to use cy.selectFile() to upload a file in Cypress test. The following code looks as such:
The code when running the test through FF runs as expected and the file is uploaded with a 200 on the post request. However when running the test through Chrome. I get a 400 with an error of
{"error":{"message":"Missing required parameter - file"}}
(Coming from server). The upload does work as expected when manually doing the upload in chrome.The URL it sends the POST to is a different domain then the base url of the tested site. Could this be the cause? Im also curious about having this in the config:
"chromeWebSecurity": false
, Which is needed to load the site properly in chrome.Ive also tried wrapping the image in a fixture first, same issue.
Anyone know what i might be doing wrong and why it only seems to work in FF?
Beta Was this translation helpful? Give feedback.
All reactions