Questions tagged [cypress-file-upload]

cypress-file-upload allows its user to upload files from file system using HTML controls. It is easy to install and easy to use, supporting different file types and optional parameters (such as drag-and-drop, support of encoding types and so on)

Resources: Guide on installation and further usage

29 questions
0
votes
0 answers

How to upload a file mp4 ou jpeg in cypress and use it in the body of my request PUT or Patch?

Hello, for my test, I need to do a request in cypress. The body to put in the request contains a file.jpeg or a file.mp4. I used cy.fixture for that, but my upload souned correct but it is not. I try that but without success. (I am sorry for my bad…
0
votes
0 answers

ERROR:gpu_init.cc(446)] Passthrough is not supported, GL is disabled, ANGLE is

while opening the cypress I am facing (Passthrough is not supported, GL is disabled, ANGLE is ) this issue, for opening cypress I have tried npx cypress open. And this error appears . I have tried delete package from user/appdata/ roaming/ cypress.…
0
votes
0 answers

How do i get cypress element fixed when detached from the Dom?

Cypress requires elements be attached in the DOM to interact with them. The previous command that ran was: cy.get() This DOM element likely became detached somewhere between the previous and current command. Common situations why this…
Orji
  • 11
  • 3
0
votes
1 answer

unable to upload image using cypress?

Using this code: const imagefile='aboutfirst.png'; cy.get('[name="File"]').attachFile(imagefile); or const imagefile='aboutfirst.png'; cy.get('#File').attachFile(imagefile); I already installed the upload file path using terminal and the picture…
0
votes
1 answer

file upload with cypress is not working for PDF

even if it looks file uploaded but it didn`t , can someone tell me how can i upload pdf file with…
aktibaba
  • 3
  • 1
0
votes
1 answer

Altnernatives to the Cypress-File-Upload plugin

I have been trying to create a test case where a file uploads successfully in Cypress by installing the cypress-file-upload plugin. However, it keeps returning a false positive. After doing further research, it seems that this plugin is not 100%…
Cholis
  • 61
  • 1
  • 2
  • 5
0
votes
0 answers

Cypress test says file was upload, but the UI says otherwise

I created a test that requires me to upload a file. I installed cypress-file-upload dependency into my project. I wrote the following script below. When I run the test it says it passed and that the file was uploaded, but when I check, the file is…
csb00
  • 1,091
  • 2
  • 18
  • 36
0
votes
1 answer

Does tests order matter in Cypress? When tests uploading pdf files are at the beginning they pass, when at the end: Failed to execute atob on Window

I have a tests written in Cypress. One of the tests uploading one pdf file looks like this: it('uploads one document', () => { cy.get('input[type="file"]') .attachFile({ filePath: pdfFilePath, encoding: 'base64' , mimeType:…
JeyKey
  • 413
  • 1
  • 9
  • 22
0
votes
1 answer

While running the tests, cypress is redirecting

while I am running the tests in cypress, it is redirecting to login page, then remaining tests become fails . What is the reason for that
user2345
  • 63
  • 1
  • 10
0
votes
1 answer

Cypress file upload for negative test

I have a form that accepts a file and using cypress-file-upload, I made it to work correctly. But I also have a scenario where I need to verify an error when no file is uploaded. The package itself is validating the file is exist or not. How we can…
Dhamo
  • 1,171
  • 3
  • 19
  • 41
0
votes
1 answer

How can I check if uploaded and downloaded file have same content with cypress?

I wanted to test if the content of the uploaded file and the downloaded file are the same. So, following is what I tried through cypress: it.only(cfg.testname, () => { // 1. Login to website, navigate to desired webapge // 2. Upload the…
Rnj
  • 1,067
  • 1
  • 8
  • 23
0
votes
0 answers

Getting different error message when uploading file through cypress than manually

I was writing end to end test case for a site. In this site, user is supposed to upload python file. I want to test what happens if I rename png file with `.py extension and upload it. When I did manually, the website gave the error ERROR: You have…
Rnj
  • 1,067
  • 1
  • 8
  • 23
-1
votes
1 answer

First select from dropdown how to upload file in cypress

First click and select from dropdown how to upload file like computer or drive, after selecting computer i have to upload from my computer in cypress. I'm trying this way it's not working, No action after…
1
2