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
My tests are failing with the following error when executing in github action (these pass on local execution):
CypressError: cy.selectFile("/home/runner/work/qa-cypress/qa-cypress/cypress/downloads/PersonalTaxReturn.jpg") failed because the file does not exist at the following path:
I have verified that this file exists in my github runner image:
Run echo "Absolute path to cypress/downloads:"
Absolute path to cypress/downloads:
/home/runner/work/qa-cypress/qa-cypress/cypress/downloads
total [6](**REDACTED ****)80
drwxr-xr-x 2 runner docker 4096 May 15 1[7](https:**REDACTED ****):35 .
drwxr-xr-x 7 runner docker 4096 May 15 17:35 ..
-rw-r--r-- 1 runner docker 614[8](https:**REDACTED ****) May 15 17:35 .DS_Store
-rw-r--r-- 1 runner docker 173527 May 15 17:35 BankStatement3Month.pdf
-rw-r--r-- 1 runner docker 173527 May 15 17:35 BankStatement6Month.pdf
-rw-r--r-- 1 runner docker 14132[9](**REDACTED ****) May 15 17:35 BusinessTaxReturn.jpg
-rw-r--r-- 1 runner docker 38719 May 15 17:35 GovermentID.jpg
-rw-r--r-- 1 runner docker 141329 May 15 17:35 PersonalTaxReturn.jpg
Please correct this issue.
Desired behavior
cy.selectFile() works in github action the same as in local exeuction
Test code to reproduce
it.only("can add note to uploaded file",()=>{constfilePath=`${Cypress.config("fileServerFolder")}/cypress/downloads/PersonalTaxReturn.jpg`;cy.get("input[type=file]").first().selectFile(filePath,{force: true,});// force: true is needed to bypass the hidden input fieldcy.wait(1000);// wait for the file to upload// clean up the uploaded file by removing itcy.get(removeIcon).contains(localizedString("Remove")).click();cy.wait(2000);// Verify that all remove buttons are gonecy.get(removeIcon).contains(localizedString("Remove")).should("not.exist");});
@jennifer-shehane I have tried relative and absolute path and get the same result:
For sanity's sake, have yml step to list path and files:
Absolute path:
/home/runner/work/qa-cypress/qa-cypress/cypress/downloads
total 680
drwxr-xr-x 2 runner docker 4096 May 20 22:01 .
drwxr-xr-x 7 runner docker 4096 May 20 22:01 ..
-rw-r--r-- 1 runner docker 6148 May 20 22:01 .DS_Store
-rw-r--r-- 1 runner docker 173527 May 20 22:01 BankStatement3Month.pdf
-rw-r--r-- 1 runner docker 173527 May 20 22:01 BankStatement6Month.pdf
-rw-r--r-- 1 runner docker 141329 May 20 22:01 BusinessTaxReturn.jpg
-rw-r--r-- 1 runner docker 38719 May 20 22:01 GovermentID.jpg
-rw-r--r-- 1 runner docker 141329 May 20 22:01 PersonalTaxReturn.jpg
Test with relative path:
CypressError: cy.selectFile("cypress/downloads/BankStatement3Month.pdf") failed because the file does not exist at the following path: /home/runner/work/qa-cypress/qa-cypress/cypress/downloads/BankStatement3Month.pdf
Test with that uses ${Cypress.config("fileServerFolder")}/cypress/downloads/PersonalTaxReturn.jpg
for doc path:
CypressError: cy.selectFile("/home/runner/work/qa-cypress/qa-cypress/cypress/downloads/PersonalTaxReturn.jpg") failed because the file does not exist at the following path:
Uh oh!
There was an error while loading. Please reload this page.
Current behavior
My tests are failing with the following error when executing in github action (these pass on local execution):
/home/runner/work/qa-cypress/qa-cypress/cypress/downloads/PersonalTaxReturn.jpg
I have verified that this file exists in my github runner image:
Run echo "Absolute path to cypress/downloads:"
Absolute path to cypress/downloads:
Please correct this issue.
Desired behavior
cy.selectFile() works in github action the same as in local exeuction
Test code to reproduce
Cypress Version
14.3.2
Node version
23.11.1
Operating System
Download action repository 'cypress-io/github-action@v6'
Debug Logs
Other
No response
The text was updated successfully, but these errors were encountered: