Cypress Tutorial For Beginners : Part 2 ( Upload a File )
In this video cypress tutorial for beginners, We are going to learn how to upload a file in cypress and create our first script to test to upload a file and check that file is uploaded successfully.
Contents
Cypress Upload File
You need to install
- Download the node module : npm i cypress-file-upload
2. Require it in your script
import 'cypress-file-upload';
3. Now use the Fixture method to upload the file.
const fileName = 'data.json';
cy.fixture(fileName).then(fileContent => {
cy.get('[data-cy="file-input"]').upload({ fileContent, fileName, mimeType: 'application/json' });
});
-----------------------------------------------------
👪 Join our Community - http://bit.ly/learntesting2019
✅ Automation Community - https://thetestingacademy.com
🐦Follow us on Twitter - https://twitter.com/itstechmode
📖 Like us on Facebook - https://www.facebook.com/scrolltest
🎤 Listen to our Podcast - https://anchor.fm/thetestingacademy
------------------------------------------------------
#automationtesting #manualtesting #testautomation #thetestingacademy #scrolltest
WebSocket Testing With Playwright: Real-Time Apps, Chat, Live Dashboards
Chat apps, live dashboards, trading platforms, multiplayer games — all use WebSockets.
Day 13: Playwright Selects, Frames, Keyboard, Hover, Drag-and-Drop, and Alerts
This is Day 13 of the 21-day JS to Playwright Framework series.
GraphQL Testing for QA Engineers: Queries, Mutations, Schema Validation, and Security
GraphQL APIs are different from REST. Single endpoint, dynamic queries, nested resolvers,
Day 12: Playwright Storage State, Allure, Lists, and Web Tables
This is Day 12 of the 21-day JS to Playwright Framework series.
Test Strategy for Microservices: The Complete QA Approach Beyond Unit Tests
Microservices broke the monolith. They also broke your test strategy. Each service
Day 11: Playwright Locators — Role, CSS, XPath, and VWO Login
This is Day 11 of the 21-day JS to Playwright Framework series.

Thank you! It was very helpful
it was helpful but facing issue in cypress-file -upload command when we are running it on jenkins there is any method that we can use ?
Hey!
How can I upload a (.side) file?
How to pass all parameters with blob(images,auio.etc) in cypress API testing