From e95b64c0f5e43e3b0ee522d1caf1521bf0fd371f Mon Sep 17 00:00:00 2001 From: Matt Schile Date: Thu, 12 Dec 2024 19:14:47 -0700 Subject: [PATCH 1/5] docs: add chrome for testing browser (#6038) --- docs/app/references/launching-browsers.mdx | 20 +++++--- docs/app/references/troubleshooting.mdx | 57 ++++++++++++++++------ 2 files changed, 55 insertions(+), 22 deletions(-) diff --git a/docs/app/references/launching-browsers.mdx b/docs/app/references/launching-browsers.mdx index d7e44b0dc6..7fbc337e79 100644 --- a/docs/app/references/launching-browsers.mdx +++ b/docs/app/references/launching-browsers.mdx @@ -31,6 +31,7 @@ using number of browsers including: - [Chrome](https://www.google.com/chrome/) - [Chrome Beta](https://www.google.com/chrome/beta/) - [Chrome Canary](https://www.google.com/chrome/canary/) +- [Chrome for Testing](https://github.com/GoogleChromeLabs/chrome-for-testing/) - [Chromium](https://www.chromium.org/Home) - [Edge](https://www.microsoft.com/edge) - [Edge Beta](https://www.microsoftedgeinsider.com/download) @@ -63,7 +64,7 @@ Cypress supports the browser versions below: The Chrome browser is evergreen - meaning it will automatically update itself, sometimes causing a breaking change in your automated tests. You can use the information in [Download Chromium](https://on.cypress.io/chromium-downloads) to download a -specific released version of Chromium for every platform. +specific released version of Chrome for Testing or Chromium for every platform. ### Electron Browser @@ -123,6 +124,12 @@ Or Chrome Canary: cypress run --browser chrome:canary ``` +Or Chrome for Testing: + +```shell +cypress run --browser chrome-for-testing +``` + ### Edge Browsers Microsoft Edge-family (Chromium-based) browsers are supported by Cypress. @@ -268,11 +275,11 @@ list of browsers you want available for selection during `cypress open`. // name: 'chrome', // channel: 'canary', // family: 'chromium', -// displayName: 'Canary', -// version: '80.0.3966.0', +// displayName: 'Chrome Canary', +// version: '133.0.6890.0', // path: -// '/Applications/Canary.app/Contents/MacOS/Canary', -// majorVersion: 80 +// '/Applications/Google Chrome Canary.app/Contents/MacOS/Canary', +// majorVersion: 133 // } return { browsers: config.browsers.filter( @@ -350,8 +357,7 @@ in the **Settings** tab. ### Unsupported Browsers -Some browsers such as Safari and Internet Explorer are not currently supported. -Support for more browsers is on our roadmap. +Some browsers such as Internet Explorer are not currently supported. ## Browser Environment diff --git a/docs/app/references/troubleshooting.mdx b/docs/app/references/troubleshooting.mdx index 5670ccd602..15b4363cb9 100644 --- a/docs/app/references/troubleshooting.mdx +++ b/docs/app/references/troubleshooting.mdx @@ -415,11 +415,20 @@ On Mac, Cypress attempts to find installed browsers by their bundle identifier. If this does not succeed, it will fall back to the Linux browser detection method. -| Browser Name | Expected Bundle Identifier | Expected Executable | -| --------------- | -------------------------- | ------------------------------------- | -| `chrome` | `com.google.Chrome` | `Contents/MacOS/Google Chrome` | -| `chromium` | `org.chromium.Chromium` | `Contents/MacOS/Chromium` | -| `chrome:canary` | `com.google.Chrome.canary` | `Contents/MacOS/Google Chrome Canary` | +| Browser Name | Expected Bundle Identifier | Expected Executable Path | +| -------------------- | ------------------------------------- | -------------------------------------------------------------------------------------- | +| `chrome` | `com.google.Chrome` | `/Applications/Google Chrome.app/Contents/MacOS/Google Chrome` | +| `chrome:beta` | `com.google.Chrome.beta` | `/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta` | +| `chrome:canary` | `com.google.Chrome.canary` | `/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary` | +| `chrome-for-testing` | `com.google.chrome.for.testing` | `/Applications/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing` | +| `chromium` | `org.chromium.Chromium` | `/Applications/Chromium.app/Contents/MacOS/Chromium` | +| `firefox` | `org.mozilla.firefox` | `/Applications/Firefox.app/Contents/MacOS/firefox` | +| `firefox:dev` | `org.mozilla.firefoxdeveloperedition` | `/Applications/Firefox Developer Edition.app/Contents/MacOS/firefox` | +| `firefox:nightly` | `org.mozilla.nightly` | `/Applications/Firefox Nightly.app/Contents/MacOS/firefox` | +| `edge` | `com.microsoft.Edge` | `/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge` | +| `edge:beta` | `com.microsoft.Edge.Beta` | `/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta` | +| `edge:canary` | `com.microsoft.Edge.Canary` | `/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary` | +| `edge:dev` | `com.microsoft.Edge.Dev` | `/Applications/Microsoft Edge Dev.app/Contents/MacOS/Microsoft Edge Dev` | For the current list, see [packages/launcher](https://github.com/cypress-io/cypress/blob/develop/packages/launcher/lib/darwin/index.ts) @@ -431,11 +440,20 @@ On Linux, Cypress scans your `PATH` for a number of different binary names. If the browser you are trying to use does not exist under one of the expected binary names, Cypress will not be able to find it. -| Browser Name | Expected Binary Name(s) | -| --------------- | ---------------------------------------------------- | -| `chrome` | `google-chrome`, `chrome`, or `google-chrome-stable` | -| `chromium` | `chromium-browser` or `chromium` | -| `chrome:canary` | `google-chrome-canary` | +| Browser Name | Expected Binary Name(s) | +| -------------------- | ---------------------------------------------------- | +| `chrome` | `google-chrome`, `chrome`, or `google-chrome-stable` | +| `chrome:beta` | `google-chrome-beta` | +| `chrome:canary` | `google-chrome-canary` | +| `chrome-for-testing` | `chrome` | +| `chromium` | `chromium-browser` or `chromium` | +| `firefox` | `firefox` | +| `firefox:dev` | `firefox-developer-edition`, `firefox` | +| `firefox:nightly` | `firefox-nightly`, `firefox-trunk` | +| `edge` | `edge`, `microsoft-edge` | +| `edge:beta` | `edge-beta`, `microsoft-edge-beta` | +| `edge:canary` | `edge-canary`, `microsoft-edge-canary` | +| `edge:dev` | `edge-dev`, `microsoft-edge-dev` | These binary names should work for most Linux distributions. If your distribution packages browsers under a different binary name, you can add a @@ -452,11 +470,20 @@ sudo ln `which chrome` /usr/local/bin/google-chrome On Windows, Cypress scans the following locations to try to find each browser: -| Browser Name | Expected Path | -| --------------- | ------------------------------------------------------------- | -| `chrome` | `C:/Program Files (x86)/Google/Chrome/Application/chrome.exe` | -| `chromium` | `C:/Program Files (x86)/Google/chrome-win32/chrome.exe` | -| `chrome:canary` | `%APPDATA%/../Local/Google/Chrome SxS/Application/chrome.exe` | +| Browser Name | Expected Executable Path | +| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `chrome` | `C:/Program Files (x86)/Google/Chrome/Application/chrome.exe`, `C:/Program Files/Google/Chrome/Application/chrome.exe` | +| `chrome:beta` | `C:/Program Files (x86)/Google/Chrome Beta/Application/chrome.exe`, `C:/Program Files/Google/Chrome Beta/Application/chrome.exe` | +| `chrome:canary` | `%APPDATA%/Local/Google/Chrome SxS/Application/chrome.exe` | +| `chrome-for-testing` | `C:/Program Files/Google/Chrome for Testing/chrome.exe`, `C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe` | +| `chromium` | `C:/Program Files (x86)/Google/chrome-win32/chrome.exe` | +| `firefox` | `C:/Program Files/Mozilla Firefox/firefox.exe`, `C:/Program Files (x86)/Mozilla Firefox/firefox.exe`, `%APPDATA%/Local/Mozilla Firefox/firefox.exe` | +| `firefox:dev` | `C:/Program Files/Firefox Developer Edition/firefox.exe`, `C:/Program Files (x86)/Firefox Developer Edition/firefox.exe`, `%APPDATA%/Local/Firefox Developer Edition/firefox.exe` | +| `firefox:nightly` | `C:/Program Files/Firefox Nightly/firefox.exe`, `C:/Program Files (x86)/Firefox Nightly/firefox.exe`, `%APPDATA%/Local/Firefox Nightly/firefox.exe` | +| `edge` | `C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe` | +| `edge:beta` | `C:/Program Files (x86)/Microsoft/Edge Beta/Application/msedge.exe` | +| `edge:canary` | `%APPDATA%/Local/Microsoft/Edge SxS/Application/msedge.exe` | +| `edge:dev` | `C:/Program Files (x86)/Microsoft/Edge Dev/Application/msedge.exe` | For the current list, see [packages/launcher](https://github.com/cypress-io/cypress/blob/develop/packages/launcher/lib/windows/index.ts) From 692d89e85d4ad4002a8a0c7f35e4c6dae472c204 Mon Sep 17 00:00:00 2001 From: Matt Schile Date: Fri, 13 Dec 2024 15:30:05 -0700 Subject: [PATCH 2/5] docs: add additional browser install notes (#6040) --- docs/app/references/troubleshooting.mdx | 36 ++++++++++++++----------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/docs/app/references/troubleshooting.mdx b/docs/app/references/troubleshooting.mdx index 15b4363cb9..be8482dc6f 100644 --- a/docs/app/references/troubleshooting.mdx +++ b/docs/app/references/troubleshooting.mdx @@ -434,6 +434,8 @@ For the current list, see [packages/launcher](https://github.com/cypress-io/cypress/blob/develop/packages/launcher/lib/darwin/index.ts) files. +**Note:** `chrome-for-testing` and `chromium` typically require the downloaded application file to be manually moved to the `/Applications` folder. + #### Linux On Linux, Cypress scans your `PATH` for a number of different binary names. If @@ -466,35 +468,39 @@ add a symlink to `google-chrome` like this: sudo ln `which chrome` /usr/local/bin/google-chrome ``` +**Note:** `chrome-for-testing` and `chromium` typically require the binary to be manually added to the `PATH` to be auto-detected. + #### Windows On Windows, Cypress scans the following locations to try to find each browser: -| Browser Name | Expected Executable Path | -| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `chrome` | `C:/Program Files (x86)/Google/Chrome/Application/chrome.exe`, `C:/Program Files/Google/Chrome/Application/chrome.exe` | -| `chrome:beta` | `C:/Program Files (x86)/Google/Chrome Beta/Application/chrome.exe`, `C:/Program Files/Google/Chrome Beta/Application/chrome.exe` | -| `chrome:canary` | `%APPDATA%/Local/Google/Chrome SxS/Application/chrome.exe` | -| `chrome-for-testing` | `C:/Program Files/Google/Chrome for Testing/chrome.exe`, `C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe` | -| `chromium` | `C:/Program Files (x86)/Google/chrome-win32/chrome.exe` | -| `firefox` | `C:/Program Files/Mozilla Firefox/firefox.exe`, `C:/Program Files (x86)/Mozilla Firefox/firefox.exe`, `%APPDATA%/Local/Mozilla Firefox/firefox.exe` | -| `firefox:dev` | `C:/Program Files/Firefox Developer Edition/firefox.exe`, `C:/Program Files (x86)/Firefox Developer Edition/firefox.exe`, `%APPDATA%/Local/Firefox Developer Edition/firefox.exe` | -| `firefox:nightly` | `C:/Program Files/Firefox Nightly/firefox.exe`, `C:/Program Files (x86)/Firefox Nightly/firefox.exe`, `%APPDATA%/Local/Firefox Nightly/firefox.exe` | -| `edge` | `C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe` | -| `edge:beta` | `C:/Program Files (x86)/Microsoft/Edge Beta/Application/msedge.exe` | -| `edge:canary` | `%APPDATA%/Local/Microsoft/Edge SxS/Application/msedge.exe` | -| `edge:dev` | `C:/Program Files (x86)/Microsoft/Edge Dev/Application/msedge.exe` | +| Browser Name | Expected Executable Path | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `chrome` | `C:/Program Files (x86)/Google/Chrome/Application/chrome.exe`, `C:/Program Files/Google/Chrome/Application/chrome.exe` | +| `chrome:beta` | `C:/Program Files (x86)/Google/Chrome Beta/Application/chrome.exe`, `C:/Program Files/Google/Chrome Beta/Application/chrome.exe` | +| `chrome:canary` | `%APPDATA%/Local/Google/Chrome SxS/Application/chrome.exe` | +| `chrome-for-testing` | `C:/Program Files/Google/Chrome for Testing/chrome.exe`, `C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe` | +| `chromium` | `C:/Program Files (x86)/Google/chrome-win32/chrome.exe`, `C:/Program Files/Google/chrome-win/chrome.exe`, `C:/Program Files/Google/Chromium/chrome.exe`, `C:/Program Files (x86)/Google/Chromium/chrome.exe` | +| `firefox` | `C:/Program Files/Mozilla Firefox/firefox.exe`, `C:/Program Files (x86)/Mozilla Firefox/firefox.exe`, `%APPDATA%/Local/Mozilla Firefox/firefox.exe` | +| `firefox:dev` | `C:/Program Files/Firefox Developer Edition/firefox.exe`, `C:/Program Files (x86)/Firefox Developer Edition/firefox.exe`, `%APPDATA%/Local/Firefox Developer Edition/firefox.exe` | +| `firefox:nightly` | `C:/Program Files/Firefox Nightly/firefox.exe`, `C:/Program Files (x86)/Firefox Nightly/firefox.exe`, `%APPDATA%/Local/Firefox Nightly/firefox.exe` | +| `edge` | `C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe` | +| `edge:beta` | `C:/Program Files (x86)/Microsoft/Edge Beta/Application/msedge.exe` | +| `edge:canary` | `%APPDATA%/Local/Microsoft/Edge SxS/Application/msedge.exe` | +| `edge:dev` | `C:/Program Files (x86)/Microsoft/Edge Dev/Application/msedge.exe` | For the current list, see [packages/launcher](https://github.com/cypress-io/cypress/blob/develop/packages/launcher/lib/windows/index.ts) files. To make a browser installed at a different path be auto-detected, create a -symbolic link using `mklink` in the location that Cypress expects to find your +symlink using `mklink` in the location that Cypress expects to find your browser. [Read more about creating symbolic links on Windows](https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/) +**Note:** `chrome-for-testing` and `chromium` typically require the downloaded folder to either be moved and renamed to the location mentioned above or a symlink created as described above. + Occasionally Cypress will have issues detecting the type of browser in Windows environments. To manually detect the browser type, append the browser type to the end of the path: From ad909e230f6459efd0f93a2f7e63aa9fbf12efdf Mon Sep 17 00:00:00 2001 From: Matt Schile Date: Mon, 16 Dec 2024 14:21:04 -0700 Subject: [PATCH 3/5] docs: update symlinks in browser troubleshooting (#6051) --- docs/app/references/troubleshooting.mdx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/app/references/troubleshooting.mdx b/docs/app/references/troubleshooting.mdx index be8482dc6f..373a6e00d1 100644 --- a/docs/app/references/troubleshooting.mdx +++ b/docs/app/references/troubleshooting.mdx @@ -434,7 +434,7 @@ For the current list, see [packages/launcher](https://github.com/cypress-io/cypress/blob/develop/packages/launcher/lib/darwin/index.ts) files. -**Note:** `chrome-for-testing` and `chromium` typically require the downloaded application file to be manually moved to the `/Applications` folder. +**Note:** `chrome-for-testing` and `chromium` typically require the downloaded application file to be manually moved to the `/Applications` folder to be auto-detected. #### Linux @@ -461,14 +461,13 @@ These binary names should work for most Linux distributions. If your distribution packages browsers under a different binary name, you can add a symlink using the expected binary name so that Cypress can detect it. -For example, if your distribution packages Google Chrome as `chrome`, you could -add a symlink to `google-chrome` like this: +For example, to create a symlink for the `chrome-for-testing` browser: ```shell -sudo ln `which chrome` /usr/local/bin/google-chrome +sudo ln -s /path/to/binary/chrome /usr/local/bin/chrome ``` -**Note:** `chrome-for-testing` and `chromium` typically require the binary to be manually added to the `PATH` to be auto-detected. +**Note:** `chrome-for-testing` and `chromium` typically require the binary to be manually added to the `PATH` or a symlink created to be auto-detected. #### Windows @@ -497,9 +496,13 @@ To make a browser installed at a different path be auto-detected, create a symlink using `mklink` in the location that Cypress expects to find your browser. -[Read more about creating symbolic links on Windows](https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/) +For example, to create a symlink for the `chrome-for-testing` browser: -**Note:** `chrome-for-testing` and `chromium` typically require the downloaded folder to either be moved and renamed to the location mentioned above or a symlink created as described above. +```shell +mklink /d "C:\Program Files\Google\Chrome for Testing" "C:\path\to\chrome\executable\folder" +``` + +**Note:** `chrome-for-testing` and `chromium` typically require the downloaded folder to either be moved and renamed to the location mentioned above or a symlink created as described above to be auto-detected. Occasionally Cypress will have issues detecting the type of browser in Windows environments. To manually detect the browser type, append the browser type to From cf79d4354f5271a89c8cfab6a64f08572c3d44d7 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Tue, 17 Dec 2024 10:25:52 -0700 Subject: [PATCH 4/5] updating changelog --- docs/app/references/changelog.mdx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/app/references/changelog.mdx b/docs/app/references/changelog.mdx index ee3a3c36a1..7b5a946be0 100644 --- a/docs/app/references/changelog.mdx +++ b/docs/app/references/changelog.mdx @@ -2,6 +2,28 @@ title: Changelog --- +## 13.17.0 + +_Released 12/17/2024_ + +**Features:** + +- Added official support for the [Google Chrome for Testing](https://github.com/GoogleChromeLabs/chrome-for-testing) browser. Assuming the browser is in a location where it can be [auto-detected](https://on.cypress.io/troubleshooting-launching-browsers), it can be launched by providing the `--browser chrome-for-testing` option. If it can't be auto-detected, the path to the browser can also be provided. Previously [customizing the available browsers](https://on.cypress.io/customize-browsers) was required. Addresses [#28123](https://github.com/cypress-io/cypress/issues/28123) and [#28554](https://github.com/cypress-io/cypress/issues/28554). + +**Bugfixes:** + +- Fixed an issue where targets may hang if `Network.enable` is not implemented for the target. Addresses [#29876](https://github.com/cypress-io/cypress/issues/29876). +- Updated Firefox `userChrome.css` to correctly hide the toolbox during headless mode. Addresses [#30721](https://github.com/cypress-io/cypress/issues/30721). +- Fixed an issue loading the `cypress.config.ts` file with Node.js version `22.12.0` if it is loaded as an ESM. Addresses [#30715](https://github.com/cypress-io/cypress/issues/30715). + +**Misc:** + +- Removed a comment from the scaffolded `supportFile` for component tests around CommonJS syntax. Addresses [#23287](https://github.com/cypress-io/cypress/issues/23287). + +**Dependency Updates:** + +- Updated `chai` from `4.2.0` to `4.5.0`. Addressed in [#30737](https://github.com/cypress-io/cypress/pull/30737). + ## 13.16.1 _Released 12/04/2024_ From 735aefbb399064d220202e6d5ee7b71dbe633d4d Mon Sep 17 00:00:00 2001 From: Matt Schile Date: Tue, 17 Dec 2024 10:37:28 -0700 Subject: [PATCH 5/5] Update docs/app/references/changelog.mdx Co-authored-by: Jennifer Shehane --- docs/app/references/changelog.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/app/references/changelog.mdx b/docs/app/references/changelog.mdx index 7b5a946be0..dc9b073235 100644 --- a/docs/app/references/changelog.mdx +++ b/docs/app/references/changelog.mdx @@ -8,7 +8,7 @@ _Released 12/17/2024_ **Features:** -- Added official support for the [Google Chrome for Testing](https://github.com/GoogleChromeLabs/chrome-for-testing) browser. Assuming the browser is in a location where it can be [auto-detected](https://on.cypress.io/troubleshooting-launching-browsers), it can be launched by providing the `--browser chrome-for-testing` option. If it can't be auto-detected, the path to the browser can also be provided. Previously [customizing the available browsers](https://on.cypress.io/customize-browsers) was required. Addresses [#28123](https://github.com/cypress-io/cypress/issues/28123) and [#28554](https://github.com/cypress-io/cypress/issues/28554). +- Added official support for the [Google Chrome for Testing](https://github.com/GoogleChromeLabs/chrome-for-testing) browser. Assuming the browser is in a location where it can be [auto-detected](/app/references/troubleshooting#Launching-browsers), it can be launched by providing the `--browser chrome-for-testing` option. If it can't be auto-detected, the path to the browser can also be provided. Previously [customizing the available browsers](/app/references/launching-browsers#Customize-available-browsers) was required. Addresses [#28123](https://github.com/cypress-io/cypress/issues/28123) and [#28554](https://github.com/cypress-io/cypress/issues/28554). **Bugfixes:**