Playwright TypeScript | Data-Driven Testing Framework 🔥 | One Utility to Read CSV, Excel & JSON
Learn how to build a scalable Data-Driven Testing framework in Playwright using TypeScript. In this tutorial, we create a unified utility that automatically ...

Automation Step by Step
2.1K views • Mar 16, 2026

About this video
Learn how to build a scalable Data-Driven Testing framework in Playwright using TypeScript. In this tutorial, we create a unified utility that automatically reads test data from CSV, Excel, or JSON files using a single function.
Topics covered in this session:
• Detecting file types using path.extname
• Creating a unified data reader utility
• Reading CSV, Excel, and JSON test data
• Using switch statements for dynamic file handling
• Integrating the data reader with Playwright tests
• Designing scalable automation framework utilities
This approach is commonly used in real-world automation frameworks where test data may come from multiple sources such as CSV files, Excel spreadsheets, or JSON files. By building a unified data reader utility, we make our Playwright automation framework more flexible, scalable, and easier to maintain.
00:00 Intro
01:27 Architecture
02:08 Step 1 - In utils folder create Unified Data Reader dataReader.ts
12:31 Step 2 - Use Unified Data Reader in test login.spec.ts
17:53 Step 3 - Run and check
21:00 QUIZ - https://forms.gle/jLHcq9k7fdoUd59W8
(Let me know your score in comments)
GITHUB PROJECT - https://github.com/Raghav-Pal/PlaywrightTypeScript_Demo
▬▬▬▬▬▬▬
Share with all who may need this
If my work has helped you, consider helping any animal near you, in any way you can
Never Stop Learning
Raghav Pal
#Playwright
#PlaywrightTesting
#PlaywrightAutomation
#DataDrivenTesting
#AutomationFramework
#SoftwareTesting
#QAEngineer
#TypeScript
#TestAutomation
#PlaywrightTutorial
▬▬▬▬ USEFUL LINKS ▬▬▬▬
✅ ALL TUTORIALS - https://AutomationStepByStep.com/
✅ DATA FORMATS
JSON - https://bit.ly/3w450tq
XML - https://bit.ly/3PqRneH
✅ OTHERS
Virtualization on Windows - http://bit.ly/2SItIL9
Mock Interviews - https://bit.ly/3QGwwVJ
Redis - https://bit.ly/2N9jyCG
Misc - https://bit.ly/2Q2q5xQ
Tools & Tips - https://bit.ly/2oBfwoR
QnA Friday - https://bit.ly/2NgwGpw
Sunday Special - https://bit.ly/2wB23BO
🙌 Connect with Raghav:
* Ask Raghav: https://bit.ly/2CoJGWf
* GitHub: https://github.com/Raghav-Pal
* Udemy: https://www.udemy.com/user/raghav-pal-3/
Shorts Eng - https://bit.ly/3H9bifV
Shorts Hindi - https://bit.ly/3XY7XqN
➡️ Subscribe for more videos: https://www.youtube.com/@RaghavPal
—
Keywords:
playwright data driven testing
playwright csv testing
playwright excel testing
playwright json test data
playwright automation framework
playwright typescript tutorial
playwright read csv
playwright read excel
playwright read json
--
Topics covered in this session:
• Detecting file types using path.extname
• Creating a unified data reader utility
• Reading CSV, Excel, and JSON test data
• Using switch statements for dynamic file handling
• Integrating the data reader with Playwright tests
• Designing scalable automation framework utilities
This approach is commonly used in real-world automation frameworks where test data may come from multiple sources such as CSV files, Excel spreadsheets, or JSON files. By building a unified data reader utility, we make our Playwright automation framework more flexible, scalable, and easier to maintain.
00:00 Intro
01:27 Architecture
02:08 Step 1 - In utils folder create Unified Data Reader dataReader.ts
12:31 Step 2 - Use Unified Data Reader in test login.spec.ts
17:53 Step 3 - Run and check
21:00 QUIZ - https://forms.gle/jLHcq9k7fdoUd59W8
(Let me know your score in comments)
GITHUB PROJECT - https://github.com/Raghav-Pal/PlaywrightTypeScript_Demo
▬▬▬▬▬▬▬
Share with all who may need this
If my work has helped you, consider helping any animal near you, in any way you can
Never Stop Learning
Raghav Pal
#Playwright
#PlaywrightTesting
#PlaywrightAutomation
#DataDrivenTesting
#AutomationFramework
#SoftwareTesting
#QAEngineer
#TypeScript
#TestAutomation
#PlaywrightTutorial
▬▬▬▬ USEFUL LINKS ▬▬▬▬
✅ ALL TUTORIALS - https://AutomationStepByStep.com/
✅ DATA FORMATS
JSON - https://bit.ly/3w450tq
XML - https://bit.ly/3PqRneH
✅ OTHERS
Virtualization on Windows - http://bit.ly/2SItIL9
Mock Interviews - https://bit.ly/3QGwwVJ
Redis - https://bit.ly/2N9jyCG
Misc - https://bit.ly/2Q2q5xQ
Tools & Tips - https://bit.ly/2oBfwoR
QnA Friday - https://bit.ly/2NgwGpw
Sunday Special - https://bit.ly/2wB23BO
🙌 Connect with Raghav:
* Ask Raghav: https://bit.ly/2CoJGWf
* GitHub: https://github.com/Raghav-Pal
* Udemy: https://www.udemy.com/user/raghav-pal-3/
Shorts Eng - https://bit.ly/3H9bifV
Shorts Hindi - https://bit.ly/3XY7XqN
➡️ Subscribe for more videos: https://www.youtube.com/@RaghavPal
—
Keywords:
playwright data driven testing
playwright csv testing
playwright excel testing
playwright json test data
playwright automation framework
playwright typescript tutorial
playwright read csv
playwright read excel
playwright read json
--
Tags and Topics
Browse our collection to discover more content in these categories.
Video Information
Views
2.1K
Likes
41
Duration
21:14
Published
Mar 16, 2026
User Reviews
4.5
(2) Related Trending Topics
LIVE TRENDSRelated trending topics. Click any trend to explore more videos.
No specific trending topics match this video yet.
Explore All Trends