Unzipping the Zip File in Selenium Web Driver



Unzipping the Zip File in Selenium Web Driver



In our previous blog, we already have discussed how to zip multiple files together in single Zip File that can be used for automation tests.

In this blog we will learn how to unzip this Zip file.

To unzip a zip file, we need to read the zip file with ZipInputStream and then read all the ZipEntry one by one. Then use FileOutputStream to write them to file system.


In this example scenario I will unzip the Zip folder (TestZipFolder) placed in my project that we already discussed in our previous blog



Below is the code for this:



Output for the above Code execution would be :








SHARE THIS

Author:

My Name is Ankur Jain and I am currently working as Automation Test Architect.I am ISTQB Certified Test Manager,Certified UI Path RPA Developer as well as Certified Scrum Master with total 12 years of working experience with lot of big banking clients around the globe.I love to Design Automation Testing Frameworks with Selenium,Appium,Protractor,Cucumber,Rest-Assured, Katalon Studio and currently exploring lot in Dev-OPS as well. I am currently staying in Mumbai, Maharashtra. Please Connect with me through Contact Us page of this website.

Previous Post
Next Post
November 28, 2019 at 2:16 PM

This is a genuinely decent site post. Not very numerous individuals would really. the way you simply did. I am truly dazzled that there is such a great amount of data about this subject have been revealed and you've given a valiant effort. with so much class. Whenever needed to find out about green smoke surveys. than by all methods come in and check our stuff. SuperSU Latest Version

Reply
avatar
April 28, 2020 at 10:45 PM

How to provide path for the unzipped file

Reply
avatar