We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
selectFile
action: 'drag-drop'
Error: CypressError:
must only be invoked from the spec file or support file.
Fixture would be 'dropped' on the file input without erroring
https://github.com/RobHannay/cypress-test-tiny
cy.get('input[type=file]') .first() .selectFile('cypress/fixtures/videos/Koala1.mp4', { force: true }, { action: 'drag-drop' });
12.16.0
18.16
macOS 13.4.1
(Has some possibly sensitive info on our corporate codebase; can make available privately)
Continuation of #27099.
The text was updated successfully, but these errors were encountered:
Sorry to see you're encountering this issue. Thanks for reporting it with a reproduction.
cy.selectFile() only takes one options argument, so this can be fixed by calling it like so:
cy.selectFile()
cy.get('input[type=file]') .first() .selectFile('cypress/fixtures/videos/Koala1.mp4', { force: true, action: 'drag-drop' });
Regardless, calling it with an extra argument should not trigger that error, so this is a bug that we'll look into fixing.
Sorry, something went wrong.
Still able to reproduce #27099 via cypress-localstorage-commands.
cypress-localstorage-commands
#27099 (comment)
Sorry to see you're encountering this issue. Thanks for reporting it with a reproduction. cy.selectFile() only takes one options argument, so this can be fixed by calling it like so: cy.get('input[type=file]') .first() .selectFile('cypress/fixtures/videos/Koala1.mp4', { force: true, action: 'drag-drop' }); Regardless, calling it with an extra argument should not trigger that error, so this is a bug that we'll look into fixing.
Ah, of course!! 🤦 Thanks @chrisbreiding. Will leave this open as I guess a change in 12.15/12.16 has started causing this to error
Released in 12.17.0.
12.17.0
This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v12.17.0, please open a new issue.
chrisbreiding
Successfully merging a pull request may close this issue.
Current behavior
selectFile
withaction: 'drag-drop'
throwsError: CypressError:
cy.selectFile()must only be invoked from the spec file or support file.
Desired behavior
Fixture would be 'dropped' on the file input without erroring
Test code to reproduce
https://github.com/RobHannay/cypress-test-tiny
Cypress Version
12.16.0
Node version
18.16
Operating System
macOS 13.4.1
Debug Logs
(Has some possibly sensitive info on our corporate codebase; can make available privately)
Other
Continuation of #27099.
The text was updated successfully, but these errors were encountered: