testing - 我可以在同一台机器上运行多个版本的谷歌浏览器吗? (Mac 或 Windows)

标签 testing google-chrome cross-browser

This fabulous answer表明没有办法在一台机器上运行多个版本的谷歌浏览器。

时不时地,您会遇到一个网站用户卡在旧版本的 Chrome 上(不知道怎么回事,但它确实发生了 — 也许他们安装了 the standalone version?),但有问题,您需要能够验证它。如果没有他们的浏览器版本,很难做到这一点。

有谁知道是否真的有办法做到这一点?即

  1. 获取适用于旧版 Google Chrome 的安装程序(Google 似乎对版本保持沉默,这对用户来说很好,但对试图支持旧版本的开发人员来说不太好)
  2. 在一台机器上运行两个版本的谷歌浏览器

最佳答案

在评论中,我mentioned一种分步方法,可以轻松并排安装多个 Chrome 版本。此答案引用了我的原始答案,并包含一个为您完成这项工作的脚本。

Quoted from: section 7 of Cross-browser testing: All major browsers on ONE machine:

Chrome: Stand-alone installers can be downloaded from File Hippo. It is also possible to run multiple Chrome versions side-by-side.

Although Sandboxie can be used, it's recommended to use the next native method in order to run multiple versions side-by-side.

  1. Download the desired version(s) from File Hippo.

  2. Create a main directory, e.g. C:\Chrome\.

  3. Extract the installer (=without installing), using 7-Zip for example. After extracting, a chrome.7z archive is created. Also extract this file, and descend the created Chrome-bin directory. Now, you see chrome.exe and a dir like 18.0.1025.45. Move chrome.exe to 18.0.1025.45, then move this directory to C:\Chrome. The remaining files in Chrome-bin can safely be deleted.

  4. Create a shortcut for each version:

     "C:\Chrome\18.0.1024.45\chrome.exe" --user-data-dir="..\User Data\18" --chrome-version=18.0.1025.45
    

Explanation of this shortcut:

  • "C:\Chrome\18.0.1024.45\chrome.exe" • This is the launcher
  • --user-data-dir="..\User Data\18" • 用户配置文件,相对于 chrome.exe 的位置。你也可以

used --user-data-dir="C:\Chrome\User Data\18" for the same effect. Set your preferences for the lowest Chrome version, and duplicate the User profile for each Chrome version. Older Chrome versions refuse to use User profiles from new versions.

  • --chrome-version=18.0.1025.45 • 二进制文件的位置:
 * The location (eg `18.0.1025.45`) must be the name of the directory:
 * Must start and end with a number. A dot may appear in between.
 * The numbers do not necessarily have to match the real version number (though it's convenient to use real version numbers...).

Regarding configuration: All preferences can be set at chrome://settings/. I usually change the home page and "Under the hood" settings.

(对于旧的 Chrome 版本,此答案的旧版本引用了 Old Apps,但它们不再通过 UI 提供直接下载链接。文件仍然存在,我创建了一个 shell 脚本 (bash)简化 Chrome 版本本地存储库的创建 - 请参阅 https://gist.github.com/Rob--W/8577499 )

##VBScript 自动安装、配置和启动 我有 created a VBScript安装 配置 Chrome(在 XP 和 Windows 7 中测试)。启动脚本,然后会出现一个文件对话框(或者:将 chrome 安装程序拖放到 VBS 上)。选择 Chrome 安装程序的目标,脚本会自动解压缩文件并从预配置的基本目录复制配置文件。

默认:

  1. Chrome 二进制文件位于 C:\Chrome\ 的子文件夹中。
  2. 用户配置文件在 C:\Chrome\User Data\ 中创建。
  3. 用户配置文件将从 sFolderChromeUserDataDefault 变量中指定的目录复制,默认情况下为 C:\Chrome\User Data\2\。 首次安装 Chrome 后,设置您的首选项(主页、书签等)。然后修改源代码中的变量(见3.)。之后,安装和配置 Chrome 就变得轻而易举了。

唯一的依赖是7-zip ,预计位于 C:\Program Files\7-zip\7z.exe

关于testing - 我可以在同一台机器上运行多个版本的谷歌浏览器吗? (Mac 或 Windows),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3785991/

相关文章:

python - 我需要测试功能的哪些方面?

javascript - 如何通过网站让 chrome 登录用户的电子邮件 ID

css - 如何使所有浏览器兼容的CSS

google-chrome - Chrome 错误? CSS3 列在每个新列上都留有额外的空间

html - 段落文本在 Safari/iOS 中不换行

authentication - 使用 NTLM 身份验证进行压力测试

testing - 运行 spark-perf 时获取 SparkUncaughtExceptionHandler

javascript - 是否可以使用 Chrome 扩展在浏览器上运行 Node.js 模块

sql - 为什么我的用户表没有列错误?

javascript - Chrome 和 SVGAnimatedString 导致的 TypeError