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
I use this code to upload a File which works perfectly in Chrome, Edge and Electron but not in Firefox: cy.delayedGet('[type="file"]').selectFile('Test Word bestand.pdf', { force: true });
I have also tried this version which results in the same behavior: cy.get('input[type=file]').selectFile('cypress/fixtures/Test Word bestand.pdf', { force: true, action: 'drag-drop' });
The errror: cy.selectFile() must only be invoked from the spec file or support file.
Desired behavior
For the file to successfully upload also in Firefox
Test code to reproduce
cy.get('input[type=file]').selectFile('cypress/fixtures/Test Word bestand.pdf',{force: true,action: 'drag-drop'});cy.delayedGet('[type="file"]').selectFile('Test Word bestand.pdf',{force: true});
Hi @RKNeedsHelp
In order to give our engineers the best chance at recreating your problem, please create a reproducible example using a fork of Cypress Test Tiny. This gives us the best chance of seeing exactly what you are seeing and being able to investigate effectively.
I have only cypress installed.
Runing e2e specs tests
describe('=== Some spec ===', function () {
context('+++ Test file +++', function () {
it('- Put file into input', {}, function () {
cy.get('#file-input-xxx').selectFile('cypress/fixtures/files/test.csv');
})
})
})
Current behavior
I use this code to upload a File which works perfectly in Chrome, Edge and Electron but not in Firefox:
cy.delayedGet('[type="file"]').selectFile('Test Word bestand.pdf', { force: true });
I have also tried this version which results in the same behavior:
cy.get('input[type=file]').selectFile('cypress/fixtures/Test Word bestand.pdf', { force: true, action: 'drag-drop' });
The errror:
cy.selectFile() must only be invoked from the spec file or support file.
Desired behavior
For the file to successfully upload also in Firefox
Test code to reproduce
Cypress Version
v13.2.0
Node version
v18.17.1
Operating System
Windows 22H2
Debug Logs
Other
Issue is similar to #27149 and #27457
The text was updated successfully, but these errors were encountered: