question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SelectFile is not working for the csv file format.

See original GitHub issue

Current 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.

https://user-images.githubusercontent.com/40796489/167999754-df46f28f-ac59-47e7-9008-a0423918bafb.mov

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:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
divyagupta301commented, Oct 27, 2022

@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”,

0reactions
dhakalsamundracommented, May 16, 2022

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 ?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found