Cypress Tutorial For Beginners : Part 4 ( Cypress Download File )

In this tutorial cypress tutorial for beginners, We are going to learn how to download a file in cypress and create our first script to test to download a file and check that file is download to folder successfully. 

First make sure you install the node module of the Download file cypress from the link above.

Install the Node module

npm install cypress-downloadfile

Now You have to write the following code plugin files in plugin index.js folder.

require('cypress-downloadfile/lib/downloadFileCommand')
#Add the following lines to cypress/plugins/index.js.
const {downloadFile} = require('cypress-downloadfile/lib/addPlugin')
module.exports = (on, config) => {
on('task', {downloadFile})
}

Now You can use this below code to download the file.

cy.downloadFile('https://library.concordia.ca/help/technology/recovering_saved_files.pdf','mydownloads','demo.pdf')

-----------------------------------------------------
👪 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
------------------------------------------------------

My Complete Roadmap To Become a Software Tester(Manual) Even as Fresher or Non IT ( 2023 Edition)

My Complete Roadmap To Become a Software Tester(Manual) Even as Fresher or Non IT ( 2023 Edition)

31 Extra Things that a Manual Tester can do for High Salary, Career Growth

31 Extra Things that a Manual Tester can do for High Salary, Career Growth

How To Increase Your Salary Exponentially as QA

How To Increase Your Salary Exponentially as QA

LIVE Job READY Manual Testing Course with API Testing, SQL, Agile, Scrum,JIRA & Real LIVE Projects

LIVE Job READY Manual Testing Course with API Testing, SQL, Agile, Scrum,JIRA & Real LIVE Projects

11 TIPS to Get A QA Job Call even in Recession

11 TIPS to Get A QA Job Call even in Recession

Becoming a QA (Manual Test Engineer) Road Map Step By Step in 2023

Becoming a QA (Manual Test Engineer) Road Map Step By Step in 2023

Leave a Comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.

🛑 LIVE Classes to Become a Job Ready Manual Tester Blueprint Enroll now. (20% OFF)
+ +
LIVE Job READY Manual Testing Course with API Testing, SQL, Agile, Scrum,JIRA & Real LIVE Projects

Become a Job Ready Software Tester with JIRA,Scrum,Agile & Real Live Projects,API Testing Manually

2 Shares
Share2
Tweet
Pin