Last Thursday, I had the amazing opportunity to attend the Sri Lanka Developer Forum (SLDF) – July Meetup hosted at the stunning TIQRI office. As someone who’s been following SLDF for a while, this was my first time attending in person, and it truly exceeded expectations! 🙌
This blog post isn’t just about the event. it’s also about the super cool tool I discovered for the first time: Playwright.
🌟 Event Highlights
The meetup brought together developers from across the country for an evening full of knowledge sharing, tech discussions, and inspiration. Huge appreciation to the SLDF organizing team:
👉 Abishek Haththakage, Fiqri Ismail, Nikila Fernando, Milinda Shehan, Samiru Hemaka, Minuli Samaraweera, and Sachini Ariyarathne you all did a phenomenal job!
🎤 Session Takeaways
The event featured insightful sessions from:
- Thilina Gunarathna
- Devendri Sarathchandra
- Isuri Nakandala
Each talk had something valuable, but what really stuck with me was the session that introduced Playwright, a modern end-to-end testing framework that changed how I see browser automation. 🤯
🧪 What is Playwright?
Playwright is an open-source end-to-end testing framework developed by Microsoft that allows developers to automate browser actions for testing web apps.
It supports:
✅ Multiple browsers: Chromium, Firefox, and WebKit
✅ Multiple languages: JavaScript, TypeScript, Python, C#, and Java
✅ Headless & headful modes
✅ Mobile and desktop browser emulation
✅ Auto-waiting, screenshots, videos, and more!
🆚 Playwright vs Selenium
Feature | Playwright | Selenium |
---|---|---|
Browser Support | Chromium, Firefox, WebKit (built-in) | Chrome, Firefox, Safari, Edge |
Language Support | JS, TS, Python, C#, Java | All major languages |
Auto-Waiting | ✅ Built-in | ❌ Manual waits often needed |
Headless Mode | ✅ Yes | ✅ Yes |
Mobile Emulation | ✅ Yes | ⚠️ Requires setup |
Parallel Execution | ✅ Built-in with test runner | ⚠️ Requires extra setup |
Test Recorder | ✅ Built-in GUI recorder | ❌ Limited or external tools |
Installation Ease | ✅ One-liner | ❌ Often complex |
💻 How to Install Playwright
Getting started is super simple. You’ll need Node.js installed on your system.
You can also install the Playwright Test runner:
🚀 Getting Started with a Simple Test
Here's a basic test that opens a browser, navigates to a page, and checks the title:
Run it using:
It automatically launches the browser, runs your script, and gives test results. You can also run it in headed (visible) mode using:
🔍 Cool Capabilities of Playwright
Here’s why Playwright stands out:
✅ Auto-Waiting
No more sleep()
or waiting for elements—Playwright waits for actions to complete.
📸 Screenshots & Video
Capture screenshots or record test sessions for debugging:
🔐 Authentication State
Save login sessions to reuse across tests.
📲 Mobile Emulation
Simulate mobile devices like iPhone 13 with:
🧪 Component Testing
Playwright can now test individual UI components (like React components) in isolation.
🧬 API Testing
You can even test APIs along with your UI tests!
⚙️ Advanced Use Cases
- Parallel testing with isolated workers
- CI/CD integrations with GitHub Actions, Azure DevOps, etc.
- Test retries and smart reporting
- Custom reporters, like HTML or Allure
- Codegen tool: Record your actions into Playwright code via:
It generates code as you click through the site. extremely helpful for beginners!
💡 Final Thoughts
Discovering Playwright during the SLDF July Meetup completely changed how I think about testing in modern web development. It’s fast, reliable, and just fun to use.
Events like this remind me why being part of the Sri Lankan developer community is so rewarding. you walk in expecting a meetup, and walk out with powerful new skills and inspiration.
So, if you haven’t yet, give Playwright a try and definitely join the next SLDF event. You never know what you might learn. 🔥
👉 Have any questions or want a full Playwright setup tutorial? Let me know in the comments or message me! 😊