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
4
votes
1 answer

Uploading a file in Cypress when no input type="file"

I need to upload a file, but the thing is that the button doesn't have the tag input and attr type="file". How do I solve this? The DOM: I tried: cy.contains('div#dropdown-grouped', "Bon…
2
votes
2 answers

Cypress.io is executing commented code lines

I have updated my cypress version to new version V 10.0.3 and it is running commented code lines in the test case. below is the test case I have written and the commented lines are also included. it.only('Check the item upload file validations', ()…
2
votes
1 answer

How to manually upload a file with cypress?

I know that there is a plugin for doing this in cypress already. However using it with jar files just corrupts the file and therefore it is useless in my usecase. This is really weird because i tried it with every combination of encoding and it…
1
vote
1 answer

Cypress file upload issue

cy.fixture('images.png').then(fileContent => { cy.xpath(this.proof_of_address) .attachFile({ fileContent, fileName: 'images.png', mimeType: 'image/png' }); }); I uploaded the image file with this cypress code…
1
vote
0 answers

Required Validation package from NodeJS for CYPRESS test cases on Media(Audio, Video and Image) and Document Files

I have to write the test cases for validating whether all the uploading media and document files are valid or not in the File Upload form on ReactJS. Valid extenstions: Media: Audio(mp3, ogg), Video(mp4, ogg) & Image(png, jpg, jpeg, bmp) Document:…
1
vote
2 answers

When trying to click the upload button after uploading the file into the input field internal validation displays as File is Required in Cypress

Below is the code i'm using to upload the file into the system from the test runner. it.only('Check the item upload file validations', () => { cy.get('[icon="fa fa-cloud-upload"]').click() …
Avishka Perera
  • 416
  • 1
  • 5
  • 15
1
vote
1 answer

how to import the zip file in cypress

it("tick on the project folder in sideNavigation",() => { cy.get(":nth-child(5) > :nth-child(1) > .bp3-menu-item > .eccgui-icon").click(); cy.get("[data-test-id=empty-workspace-create-project-btn]").click(); …
1
vote
1 answer

Posting result data to a website (like API or a telegram bot) after a test on Cypress

I've finished writing my first Cypress test. Everything is good except I'm struggling to post the result data to a website. Because I want to send the result data and also if any errors occurs the result screenshot to our coworker telegram…
1
vote
1 answer

How to upload file in cypress test? once we select file in file open explorer then DOM directly uploading the file

There is a button in UI, it will open file open explorer, once we select file and click open, then DOM directly uploading the file, Upload Document Pop Up selecting the file and click open file directly getting uploaded tried all possible ways…
satheesh
  • 11
  • 1
  • 2
1
vote
2 answers

Upload file without input element in Cypress

I am trying to upload a file without an input element with cypress-file-upload library, using .attachFile(), and I haven't be able so far. I don't get any error it just doesn't upload the file. I have tried it in other part of my app with input…
Sergio
  • 21
  • 3
1
vote
0 answers

How to upload file in API using cypress

Above given my upload code, how can I upload file in API automation it('upload',function(){ const token = Cypress.env('token'); cy.request({ method:'POST', url:"/file/upload", headers: { …
user2345
  • 63
  • 1
  • 10
1
vote
1 answer

Grabbing a text from a web page in Cypress

How can I grab a text from a Webpage in Cypress using Typescript. Thank you!
1
vote
2 answers

cypress-file-upload do not attach a file to one of the fields

I'm using cypress-file-upload for attaching files to input fields. Using the same approach for all of these inputs in different places (in different modal windows in my case). But in one place files do not attach for some reason, in executed steps…
Art Olshansky
  • 3,032
  • 1
  • 19
  • 25
0
votes
1 answer

File upload without input element by using cypress

I am trying to upload a file without an input element with cypress-file-upload library, using .attachFile(), and I haven't be able so far. I don't get any error it just doesn't upload the file. I have tried it in other part of my app with input…
0
votes
2 answers

cypress-file-upload test the upload functionality with a button inside dropzone component

I am using react-dropzone library to handle uploading image files. Now I would like to test this upload behaviour. The tests are written using cypress and I am using cypress-file-upload. Here's my component I tried to follow this example…
1
2