DEV Community

Gentt
Gentt

Posted on

1 1 2

Testing out Safari on Windows (older versions too)

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! 🚀

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay