Running cypress open fails to detect edge as selectable browser in the dropdown. Have tried using cypress run --browser edge (which tells me it can't detect an edge browser) as well as providing an absolute path of
cypress run --browser /Applications/Microsoft\ Edge.app/Contents/MacOS/Microsoft\ Edge
That seems to run electron in the terminal instead of edge though this could just be because cypress hasn't been setup to run edge headlessly. I double checked that I had edge installed and the binary was in the place I expected it to be.
This file https://github.com/cypress-io/cypress/blob/develop/packages/launcher/lib/darwin/index.ts
indicates where cypress is looking so I am a bit stumped.
(Just noticed that the const detectEdge doesn't provide "Microsoft Edge.app" line like say the const detectFirefox does on line 27 of the link I provided above. Might that be the issue?
Edge binary should be automatically detected by cypress.
Install edge(chromium) for MacOS
npm init
npm install cypress@latest
cypress open
MacOS Mojave 10.14.6, Microsoft Edge (non dev or canary builds), cypress 4.0.0, node 12.0.0
I am experiencing the same issue. I have Edge, Edge Beta, Edge Canary, and Edge Developer all installed on my system - none of which are detected.

Find the location that Microsoft Edge is installed in and run that with the --browser flag. It's a little tricky and I show how to do this in MacOS in the Gif below. (I'm not sure this drag and drop works on all terminals tbh, I'm using iTerm2)
My path was /Applications/Microsoft\ Edge.app/Contents/MacOS/Microsoft\ Edge

This will pre-select the found browser and it's called Custom Edge 79.

Similarly for cypress run --browser, this will launch and run the tests in Microsoft Edge.
Logging the browser object after this launch gives the following object.
plugins/index.js
module.exports = (on, config) => {
on('before:browser:launch', (browser = {}, launchOptions) => {
console.log(browser)
})
}
{
name: 'edge',
family: 'chromium',
channel: 'stable',
displayName: 'Custom Edge',
versionRegex: {},
profile: true,
binary: 'edge',
info: 'Loaded from /Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge',
custom: true,
path: '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge',
version: '79.0.309.71',
majorVersion: 79,
isHeadless: false,
isHeaded: true
}
The above solution seems to be working ok for me so far. Thanks @jennifer-shehane
It looks like in the Info.plist file that the
<key>CFBundleIdentifier</key>
<string>com.microsoft.edgemac</string>
instead of com.microsoft.Edge
Canary shows
<key>CFBundleIdentifier</key>
<string>com.microsoft.edgemac.Canary</string>
I think I have found the issue affecting firefox nightly, and edge builds.
These apps for chrome and firefox have 4 params in https://github.com/cypress-io/cypress/blob/develop/packages/launcher/lib/darwin/index.ts
const detectCanary = partial(findApp, [
'Google Chrome Canary.app',
'Contents/MacOS/Google Chrome Canary',
'com.google.Chrome.canary',
'KSVersion',
])
const detectChrome = partial(findApp, [
'Google Chrome.app',
'Contents/MacOS/Google Chrome',
'com.google.Chrome',
'KSVersion',
])
const detectChromium = partial(findApp, [
'Chromium.app',
'Contents/DMacOS/Chromium',
'org.chromium.Chromium',
'CFBundleShortVersionString',
])
const detectFirefox = partial(findApp, [
'Firefox.app',
'Contents/MacOS/firefox-bin',
'org.mozilla.firefox',
'CFBundleShortVersionString',
])
const detectFirefoxDeveloperEdition = partial(findApp, [
'Firefox Developer Edition.app',
'Contents/MacOS/firefox-bin',
'org.mozilla.firefoxdeveloperedition',
'CFBundleShortVersionString',
])
These for firefox nightly and edge have 3
const detectFirefoxNightly = partial(findApp, [
'Firefox Nightly.app',
'Contents/MacOS/firefox-bin',
'org.mozilla.nightly',
])
const detectEdgeCanary = partial(findApp, [
'Contents/MacOS/Microsoft Edge Canary',
'com.microsoft.Edge.Canary',
'CFBundleShortVersionString',
])
const detectEdgeBeta = partial(findApp, [
'Contents/MacOS/Microsoft Edge Beta',
'com.microsoft.Edge.Beta',
'CFBundleShortVersionString',
])
const detectEdgeDev = partial(findApp, [
'Contents/MacOS/Microsoft Edge Dev',
'com.microsoft.Edge.Dev',
'CFBundleShortVersionString',
])
const detectEdge = partial(findApp, [
'Contents/MacOS/Microsoft Edge',
'com.microsoft.Edge',
'CFBundleShortVersionString',
])
There needs to be a 4th param for
detectFirefoxNightly
const detectFirefoxNightly = partial(findApp, [
'Firefox Nightly.app',
'Contents/MacOS/firefox-bin',
'org.mozilla.nightly',
'CFBundleShortVersionString'
])
For edge, it should be
const detectEdgeCanary = partial(findApp, [
'Microsoft Edge Canary.app',
'Contents/MacOS/Microsoft Edge Canary',
'com.microsoft.Edge.Canary',
'CFBundleShortVersionString',
])
const detectEdgeBeta = partial(findApp, [
'Microsoft Edge Beta.app',
'Contents/MacOS/Microsoft Edge Beta',
'com.microsoft.Edge.Beta',
'CFBundleShortVersionString',
])
const detectEdgeDev = partial(findApp, [
'Microsoft Edge Dev.app',
'Contents/MacOS/Microsoft Edge Dev',
'com.microsoft.Edge.Dev',
'CFBundleShortVersionString',
])
const detectEdge = partial(findApp, [
'Microsoft Edge.app',
'Contents/MacOS/Microsoft Edge',
'com.microsoft.Edge',
'CFBundleShortVersionString',
])
This is because findApp function in utils.ts (https://github.com/cypress-io/cypress/blob/develop/packages/launcher/lib/darwin/util.ts) takes 4 parameters
appName: string,
executable: string,
appId: string,
versionProperty: string
It also looks like the CFBundleIdentifier is different so is now
so edge should probably be
const detectEdgeCanary = partial(findApp, [
'Microsoft Edge Canary.app',
'Contents/MacOS/Microsoft Edge Canary',
'com.microsoft.edgemac.Canary',
'CFBundleShortVersionString',
])
const detectEdgeBeta = partial(findApp, [
'Microsoft Edge Beta.app',
'Contents/MacOS/Microsoft Edge Beta',
'com.microsoft.edgemac.Beta',
'CFBundleShortVersionString',
])
const detectEdgeDev = partial(findApp, [
'Microsoft Edge Dev.app',
'Contents/MacOS/Microsoft Edge Dev',
'com.microsoft.edgemac.Dev',
'CFBundleShortVersionString',
])
const detectEdge = partial(findApp, [
'Microsoft Edge.app',
'Contents/MacOS/Microsoft Edge',
'com.microsoft.edgemac',
'CFBundleShortVersionString',
])
The code for this is done in cypress-io/cypress#6364, but has yet to be released.
We'll update this issue and reference the changelog when it's released.
Released in 4.0.1.
This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.0.1, please open a new issue.
Most helpful comment
I am experiencing the same issue. I have Edge, Edge Beta, Edge Canary, and Edge Developer all installed on my system - none of which are detected.
Workaround
Find the location that Microsoft Edge is installed in and run that with the
--browserflag. It's a little tricky and I show how to do this in MacOS in the Gif below. (I'm not sure this drag and drop works on all terminals tbh, I'm using iTerm2)My path was
/Applications/Microsoft\ Edge.app/Contents/MacOS/Microsoft\ EdgeThis will pre-select the found browser and it's called
Custom Edge 79.Similarly for
cypress run --browser, this will launch and run the tests in Microsoft Edge.For debugging
Logging the
browserobject after this launch gives the following object.plugins/index.js