SelectFile is not working for the csv file format.
See original GitHub issueCurrent behavior
When running the file upload with the cypress, the csv file is not getting recognise while uploading the file. If I upload the same file manually, it will upload as csv. But when I tried to upload the csv file via automation, there is validation error saying Please select the csv file for same file which was working via manual upload. Am I missing something here? please check the attached video below.
Desired behavior
File should be in csv format while uploading.
Test code to reproduce
cy.get("input[type='file']").selectFile("cypress/fixtures/contributors.csv");
Cypress Version
9.5.0
Other
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Select file on Import-Csv - powershell - Stack Overflow
The code below is part of a switch and it's working fine, but the problem is: I need to change my file name...
Read more >Uploading files made easy with the .selectFile command
selectFile () command, new in Cypress 9.3.0. Selecting files in an HTML5 input elementWith the new .selectFile() command, you.
Read more >Import or export text (.txt or .csv) files - Microsoft Support
Go to File > Save As. Click Browse. In the Save As dialog box, under Save as type box, choose the text file...
Read more >Solved trouble importing csv file; not all csv files are the same
I was never able to import using the browser extension/three dots/import/website/drop or select file, nothing ever worked, not even when I ...
Read more >How to troubleshoot issues with imported/exported files
Issues with importing CSV files to Rayyan ... Select File > Options > Advanced. ... Issues with reading CSV file on your PC....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dhakalsamundra - Hi, do you have any update on this issue? Is this issue fixed in the latest version of cypress. I am using following versions:
“cypress-file-upload”: “^5.0.8”, “cypress”: “9.4.1”,
I have not get any solution. I can add the csv file but if there is any validation of file format, then it will show the validation error while manually adding won’t show it. Are you also facing exactly the same, @jitenderchand1 ?