Testing Safari on Windows (Without Losing Your Mind)
Hey everyone! It’s been a while... 😊 I recently ran into a tricky situation where I had to debug an issue happening specifically on Safari while working on a Windows machine. Let’s just say—it was a challenge. 😅
Thankfully, I stumbled upon an awesome article:
👉 Test Your Site in Every Browser
This article introduced me to a handy trick using Playwright. With a simple command, you can open a browser that uses the WebKit engine (the same engine Safari is built on) and pause it, giving you full control to:
- Visit pages
- Click around
- Watch videos
- And more!
The Specific Safari Version Problem
While this approach was a game-changer, it wasn’t a complete solution for my case. I needed to debug a specific major version of Safari, and WebKit alone didn’t quite cut it.
Here’s where it got interesting:
I dove into the Playwright changelog, where I discovered that it maps Playwright versions to specific WebKit versions. Using this information, I was able to emulate the Safari version I needed, by installing that version instead! 🎉
Debugging with DevTools
What’s even better? The emulated browser allows you to open DevTools, making it easier to inspect and debug issues. This saved me tons of time and effort—without needing access to a physical macOS device.
Limitations
Of course, there might be some limitations I haven’t encountered yet, like file uploads or other advanced functionality. But for my use case, this was an effective and FREE solution that worked perfectly.
Got Suggestions?
If you have any other suggestions for testing Safari on non-Mac devices, I’d love to hear them! From what I’ve seen, most services offering Safari emulation are either trials or require a paid subscription, so finding a free alternative like this was a gem. 💎
Happy coding! 🚀
Top comments (0)