Closed nickserv closed 7 years ago
Hey, great to hear. I think it would be nice to have support in the IE launcher for Edge, as we do something similar for the other launchers, e.g. the Chrome launcher can handle Chromium, Chrome Canary and Dart. You can take a look at how it's done at the moment here for Chrome. So I would suggest something like that, maybe with splitting it up into multiple files though would be nicer.
I think that Edge is going in a different direction than IE despite being based off of it, so in my opinion I'm not sure how easy it would be to treat Edge as another version of IE (and Microsoft might eventually deprecate IE in the future). That being said, there is still some similarity in how they need to be launched. I will keep investigating how it would be to include Edge support in this same launcher plugin.
Here are some of the differences that Edge has with IE that will affect us:
x-au-compatible
is unnecessary (Edge doesn't support it because it does not have legacy browser support).Thanks for the detailed explanation. In that case it could make sense to put it into a different package.
At the moment most of the launchers all have their own logic, more or less the same for detecting executables, maybe we could extract this logic into a package and use this in both places?
If you want I can create a new karma-edge-launcher
repo and give you access to work on it.
I started a fork, I'll see how it goes.
At the moment most of the launchers all have their own logic, more or less the same for detecting executables, maybe we could extract this logic into a package and use this in both places?
This sounds awesome. However, I'm starting to think that the Edge launcher will not only need to be launched differently, but it might also involve changes to Karma itself (because Microsoft Edge is not an EXE and Karma launches EXEs on Windows). If we can get around that, it would be cool to have a shared library for launching browsers across operating systems.
If you want I can create a new karma-edge-launcher repo and give you access to work on it.
If you want, thanks! I don't have a working implementation that will actually launch Edge yet, so if you want I can keep using my fork and then maybe move it to the organization later.
As long as spawn
supports starting edge it shoiukdn'y be a problem passing that to Karma.
Sure, you can work on your fork and when you are ready just let me know and we can pull it in :)
Let me know if you have any more questions.
Thanks!
I assume you're talking about child_process.spawn()
? If so, I'm having a hard time using it to successfully launch Edge. It seems like you can't run it like a normal executable file.
Yes I am, that's what's karma is using to spawn processes. Not sure how up to date node is on the window side of things, might be best to look in the issue tracker/mailing list if there is something known about it.
Thanks for your help, I managed to figure out a way to get the Karma launcher to launch Edge.
I am now running into issues with getting Karma to wait for the results from the launcher. I must use another process to launch Edge (I don't think it's possible to launch it directly), which causes Karma to prematurely stop waiting for the launcher because it thinks that Edge has crashed (when what really happened is that its launching process closed). I have opened a GitHub issue for this on the main Karma repo, please let me know if you have any ideas or recommendations: https://github.com/karma-runner/karma/issues/1469
The powershell approach taken in the fork seems to work. for keeping the process around.
I wrote an issue about the progress of my fork:
Microsoft just released the Edge Diagnostics Adapter for debugging Edge. Since it's tricky to launch Edge as a modern-style app (and there are still bugs on master currently), I'm going to try switching to this adapter.
If you're interested, you can track my progress in this pull request.
I plan on finishing this soon, which should make it ready to publish shortly after.
My Edge fork is mostly working now, and I have an experimental version of it published on npm. It relies on Microsoft Edge Launcher, a command line exe launcher, to keep the browser open (I had a hard time getting this to work consistently with Node and PowerShell).
If it helps, I would be fine with moving it to the karma-runner organization, assuming it's stable enough for that.
See karma-edge-launcher
.
@nickmccurdy Could your fork be moved into the karma-runner organization now?
I would like to, but I don't have permission to do it on my own. See https://github.com/nickmccurdy/karma-edge-launcher/issues/2.
I am interested in contributing to a Karma launcher for Microsoft Edge. Would it be best to fork this, create a new launcher from scratch, or treat Edge as another version of IE?
In my opinion, forking would be better. Edge can share IE's code for launching the EXE, though it would be better to keep the versioning scheme separate and drop support for things that may not be needed (such as
x-au-compatible
).