So I’ve been using Cypress for a while now to test our apps, it’s an incredible testing tool, with many features developers will feel at home with and providing incredibly fast and detailed feedback which remote-browser tools cannot compete with.
However there has been a bone of contention for some. The lack of cross-browser compatibility. For now, it will only work with Chrome and Electron.
Yep, no IE10/11, Firefox, Safari, Opera etc.
Best not delete your favourite Selenium based tool just yet.
However there is some light on the horizon, and from the likes of Microsoft no less.
Rumours floated around late last year that Microsoft were ditching efforts on their budding IE11 replacement Edge, with well, Edge. Just based on Chromium this time. You can get it for Windows 10 here from Windows Insiders.
If you visit the above page on a MacOS, you’ll see a button asking you to be notified, however Twitter user WalkingCat posted up links from Microsoft’s CDN.
Microsoft Edge for Mac (Canary Build)
Microsoft Edge for Mac (Dev Build)
So I thought I would spin up Cypress and see if I could get it to work with Edge but it choked on the folder name.
Hmmm, lets rename the app so it doesn’t have spaces in it.
So we need to tell Cypress about Edge
Its listed now, good start
Lets fire up Cypress runner in GUI mode
Let’s run all the integration tests.
As if they all passed first time. How about the CLI?
Sweet! Not bad for a first run! Now we just need to wait for Microsoft to release Chromium Edge to the masses. Hopefully a linux flavour will be on the horizon, I will keep you posted if so!
Follow the PR to track Cypress & Microsoft Edge – https://github.com/cypress-io/cypress/pull/4203
Thats all folks, thanks for reading, and feel free to follow me @ https://github.com/YOU54F for more of my fumblings in code.
Update :- I’ve now followed up this with another blog post where I have published a beta version of Cypress with Edge support for testing purposes. See here for the blog post with a link to an example GitHub repo and installation instructions!
3 thoughts on “The new Chromium-based Microsoft Edge for Mac has been leaked — And it works with Cypress.”
Hi, This is amazing! thanks for sharing 🙂
I can’t find the `browsers.ts` file – Not sure how to define the browser as edge and set the path.
Removed spaces – “`npx cypress run -b /Applications/MsEdge.app/Contents/MacOS/MicrosoftEdgeDev
We could not identify a known browser at the path you provided: `/Applications/MsEdge.app/Contents/MacOS/MicrosoftEdgeDev`
The output from the command we ran was:
spawn /Applications/MsEdge.app/Contents/MacOS/MicrosoftEdgeDev ENOENT““
Hey, you’ll find `browsers.ts` in the cypress source code at `packages/launcher/lib/browsers.ts`
My full changes are shown in the following PR
You will need to package up the Cypress binary with the changes made, but I have since released a module that you can use for testing purposes, you can see it working in CI here
Btw, that path won’t work unless you remove the spaces in the actual path for the edge app, the default install path is
`/Applications/Microsoft\ Edge\ Canary.app/Contents/MacOS/Microsoft\ Edge\ Canary`
I renamed the app originally, but it was actually an unnecessary step in the end
(updated blog post is here – https://blog.you54f.com/2019/05/16/the-new-chromium-based-microsoft-edge-for-mac-has-been-leaked%e2%80%8a-%e2%80%8aand-it-works-with-cypress-and-now-you-can-test-it-too/ , it may help – otherwise feel free to email me your terminal output or a CI run and I will see what I can do to help!)