-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed as not planned
Closed as not planned
Copy link
Labels
stage: needs investigatingSomeone from Cypress needs to look at thisSomeone from Cypress needs to look at thisstaleno activity on this issue for a long periodno activity on this issue for a long periodv12.5.0 🐛
Description
Current behavior
After upgrading to latest version of Cypress, when I try to upload a file using cy.selectFile() I got an error (cy.selectFile() must only be invoked from the spec file or support file.). The same code works with Cypress 11.14.0.
Desired behavior
Should work as version 11.14.0
Test code to reproduce
Using cucumber preprocessor I have this rule that is not wotking anymore:
When('the user upload the file {string}', (fileName: string) => {
cy.get('tf-uploader input[type="file"]').selectFile(`cypress/files/${fileName}`);
});Cypress Version
13.13.0
Node version
v18.19.0
Operating System
Windows 11
Debug Logs
at <unknown> (https://<###removed###>/__cypress/runner/cypress_runner.js:114038:70)
at tryCatcher (https://<### removed ###>/__cypress/runner/cypress_runner.js:1807:23)
at Promise._settlePromiseFromHandler (https://<### removed ###>/__cypress/runner/cypress_runner.js:1519:31)
at Promise._settlePromise (https://<### removed ###>/__cypress/runner/cypress_runner.js:1576:18)
at Promise._settlePromise0 (https://<### removed ###>/__cypress/runner/cypress_runner.js:1621:10)
at Promise._settlePromises (https://<### removed ###>/__cypress/runner/cypress_runner.js:1697:18)
at <unknown> (https://<### removed ###>/__cypress/runner/cypress_runner.js:2392:25)
From previous event:
at Promise.longStackTracesCaptureStackTrace [as _captureStackTrace] (https://<### removed ###>/__cypress/runner/cypress_runner.js:3486:19)
at Promise._then (https://<### removed ###>/__cypress/runner/cypress_runner.js:1239:17)
at Promise.then (https://<### removed ###>/__cypress/runner/cypress_runner.js:1132:17)
at next (https://<### removed ###>/__cypress/runner/cypress_runner.js:144081:64)
at <unknown> (https://<### removed ###>/__cypress/runner/cypress_runner.js:144102:16)
at tryCatcher (https://<### removed ###>/__cypress/runner/cypress_runner.js:1807:23)
at Promise._settlePromiseFromHandler (https://<### removed ###>/__cypress/runner/cypress_runner.js:1519:31)
at Promise._settlePromise (https://<### removed ###>/__cypress/runner/cypress_runner.js:1576:18)
at Promise._settlePromise0 (https://<### removed ###>/__cypress/runner/cypress_runner.js:1621:10)
at Promise._settlePromises (https://<### removed ###>/__cypress/runner/cypress_runner.js:1701:18)
at <unknown> (https://<### removed ###>/__cypress/runner/cypress_runner.js:2392:25)
From Your Spec Code:
at Context.eval (https://<### removed ###>/__cypress/tests?p=cypress\features\7-provisioning%20tools\Marketplace%20Packages'%20Test\PT0009-Package%20Installation%20Job%20Vacancy%20Report.feature:21076:50)
at Registry.runStepDefininition (https://<### removed ###>/__cypress/tests?p=cypress\features\7-provisioning%20tools\Marketplace%20Packages'%20Test\PT0009-Package%20Installation%20Job%20Vacancy%20Report.feature:8508:48)
at Object.fn (https://<### removed ###>/__cypress/tests?p=cypress\features\7-provisioning%20tools\Marketplace%20Packages'%20Test\PT0009-Package%20Installation%20Job%20Vacancy%20Report.feature:15707:43)
at runStepWithLogGroup (https://<### removed ###>/__cypress/tests?p=cypress\features\7-provisioning%20tools\Marketplace%20Packages'%20Test\PT0009-Package%20Installation%20Job%20Vacancy%20Report.feature:15180:29)
at Context.eval (https://<### removed ###>/__cypress/tests?p=cypress\features\7-provisioning%20tools\Marketplace%20Packages'%20Test\PT0009-Package%20Installation%20Job%20Vacancy%20Report.feature:15703:62)Other
No response
Metadata
Metadata
Assignees
Labels
stage: needs investigatingSomeone from Cypress needs to look at thisSomeone from Cypress needs to look at thisstaleno activity on this issue for a long periodno activity on this issue for a long periodv12.5.0 🐛