Recently while working on a project, I had to create a functionality where users can download an excel file consisting of some data.
In this proce...
For further actions, you may consider blocking this person and/or reporting abuse
Unfortunately, this will not work on headless mode.
Clicking on download button does not have any effect. Neither the file appears on browser footer nor it is saved anywhere.
As a result, such tests have to be skipped when run on CI, unless there is a workaround.
hi, any luck running these tests in CI? have you gt any solution?
This piece of code does not work for me even after adding below in command.js
Cypress.Commands.add("parseXlsx", (inputFile) => {
return cy.task('parseXlsx', { filePath: inputFile })
});
Getting error "cy.parseXlsx is not a function" is not a function
Can someone help . Thanks heaps
i tried this code buy inside the spec file the parseXlsx wasn't recognized - any idea why?
Hi. Same for me. I'm very new to Cypress. Going out an a limb here, but shouldn't parseXLSX also be added to the cypress commands? Also how would you go about testing data on an excel file containing multiple sheets?
another issue,
i finally succeeded to run the code but it fail with the following error :
fs.readFileSync is not a function
i read that it because :
fs will not work in the browser. This is by design as to protect your filesystem from potential security threats.
in case it is true, how the demo show that it is possible?
you need to add this in command.js file for above code to work
Cypress.Commands.add("parseXlsx", (inputFile) => {
return cy.task('parseXlsx', { filePath: inputFile })
});
Anti-pattern, and very bad practice to arbitrarily wait for cy.wait(2000);
What if its a large file of 20MB or you are on a slow internet connection?
Will you wait for 60 seconds then?