{"id":15288924,"url":"https://github.com/p4irin/c4t","last_synced_at":"2026-01-29T14:04:52.635Z","repository":{"id":194801210,"uuid":"691580952","full_name":"p4irin/c4t","owner":"p4irin","description":"Install Chrome for Testing assets. A flavor of Chrome, specifically for testing and a matching chromedriver","archived":false,"fork":false,"pushed_at":"2024-05-06T13:28:18.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-03T18:55:33.021Z","etag":null,"topics":["chrome","chrome-for-testing","chromedriver","cli-tool","python","quality-assurance","selenium","selenium-python","selenium-webdriver","test-automation","testing","testing-library"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p4irin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-14T13:20:04.000Z","updated_at":"2024-05-06T13:28:22.000Z","dependencies_parsed_at":"2024-03-29T00:32:45.583Z","dependency_job_id":"8f44432d-55ac-420c-aabd-ff4575d78417","html_url":"https://github.com/p4irin/c4t","commit_stats":null,"previous_names":["p4irin/c4t"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4irin%2Fc4t","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4irin%2Fc4t/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4irin%2Fc4t/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4irin%2Fc4t/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p4irin","download_url":"https://codeload.github.com/p4irin/c4t/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240236196,"owners_count":19769570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chrome","chrome-for-testing","chromedriver","cli-tool","python","quality-assurance","selenium","selenium-python","selenium-webdriver","test-automation","testing","testing-library"],"created_at":"2024-09-30T15:54:40.851Z","updated_at":"2026-01-29T14:04:52.514Z","avatar_url":"https://github.com/p4irin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://dev.azure.com/p4irin/c4t/_apis/build/status%2Fp4irin.c4t?branchName=master\u0026jobName=BuildAndTest\u0026configuration=BuildAndTest%20Python38)](https://dev.azure.com/p4irin/c4t/_build/latest?definitionId=5\u0026branchName=master)\n[![c4t publish](https://github.com/p4irin/c4t/actions/workflows/python-publish.yml/badge.svg)](https://github.com/p4irin/c4t/actions/workflows/python-publish.yml)\n![PyPI - Version](https://img.shields.io/pypi/v/c4t)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/c4t)\n![PyPI - Format](https://img.shields.io/pypi/format/c4t)\n![PyPI - License](https://img.shields.io/pypi/l/c4t)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n# c4t: Chrome for Testing - v1.6.0\n\nInstall _Chrome for Testing_ assets. A flavor of Chrome, specifically for testing and a matching chromedriver. Currently, the version of assets installed is for _linux64_ platforms only.\n\n## Why Chrome for Testing?\n\nTaken from [the Chrome Developers Blog](https://developer.chrome.com/blog/chrome-for-testing/)\n\n\u003e ...setting up an adequate browser testing environment is notoriously difficult...\n\u003e\n\u003e You want consistent, reproducible results across repeated test runs—but this may not happen if the browser executable or binary decides to update itself in between two runs.\n\u003e\n\u003eYou want to pin a specific browser version and check that version number into your source code repository, so that you can check out old commits and branches and re-run the tests against the browser binary from that point in time.\n\u003e\n\u003e Not only do you have to download a Chrome binary somehow, you also need a correspondingly-versioned ChromeDriver binary to ensure the two binaries are compatible.\n\u003e\n\u003e Chrome for Testing is a dedicated flavor of Chrome targeting the testing use case, without auto-update, integrated into the Chrome release process, made available for every Chrome release\n\u003e\n\u003e ...finding a matching Chrome and ChromeDriver binary can be completely eliminated by integrating the ChromeDriver release process into the Chrome for Testing infrastructure.\n\n## Requirements\n\nTo use Chrome for Testing assets you'll need a version of Selenium \u003e 4.11.0\n\n## Installation\n\n### From PyPI\n\n```bash\n(venv) $ pip install c4t\n(venv) $\n```\n\n### From GitHub\n\n```bash\n(venv) $ pip install git+https://github.com/p4irin/c4t.git\n(venv) $\n```\n\n## Verify\n\n### In a REPL\n\n#### Show version\n\n```bash\n(venv) $ python\nPython 3.8.10 (default, Jun  2 2021, 10:49:15) \n[GCC 9.4.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e import c4t\n\u003e\u003e\u003e c4t.__version__\n'\u003cmajor\u003e.\u003cminor\u003e.\u003cpatch\u003e'\n\u003e\u003e\u003e\n```\n\n### Or on the command line\n\n#### Show version\n\n```bash\n(venv) $ c4t --version\nv1.1.0\n(venv) $\n```\n\n#### Display package documentation\n\n```bash\n(venv) $ python -m pydoc c4t\n(venv) $\n```\n\n## Usage\n\n### In code\n\n#### Install the default, the latest stable version and use it with Selenium\n\n```bash\nPython 3.8.10 (default, May 26 2023, 14:05:08) \n[GCC 9.4.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e import c4t\n\u003e\u003e\u003e assets = c4t.Assets()\n\u003e\u003e\u003e assets.install()\nCreate directory ${HOME}/.c4t-assets/124.0.6367.91\nDownloading chrome-linux64.zip.\n100% [......................................................................] 146689409 / 146689409\n\nDownloading chromedriver-linux64.zip.\n100% [..........................................................................] 7508443 / 7508443\n\nUnzipping chrome-linux64.zip\nUnzipping chromedriver-linux64.zip\nCreating symlink to chrome version 117.0.5938.62\nCreating symlink to chromedriver version 117.0.5938.62\nFinished installing version 117.0.5938.62 of Chrome for Testing and Chromedriver.\n-------------------------------------------\nVersion 117.0.5938.62 is the active version\n-------------------------------------------\n\u003e\u003e\u003e from selenium.webdriver import ChromeOptions, ChromeService, Chrome\n\u003e\u003e\u003e options = ChromeOptions()\n\u003e\u003e\u003e options.binary_location = c4t.location.chrome\n\u003e\u003e\u003e service = ChromeService(executable_path=c4t.location.chromedriver)\n\u003e\u003e\u003e browser = Chrome(options=options, service=service)\n\u003e\u003e\u003e browser.get('https://pypi.org/user/p4irin/')\n\u003e\u003e\u003e browser.close()\n\u003e\u003e\u003e browser.quit()\n\u003e\u003e\u003e\n```\n\n### On the command line\n\n#### Display command line help\n\n```bash\n(venv) $ c4t --help\nusage: c4t [-h] [-V] {install,path,list,switch,delete} ...\n\nInstall 'Chrome for Testing' assets\n\noptions:\n  -h, --help            show this help message and exit\n  -V, --version         Show version and exit.\n\nCommands:\n  {install,path,list,switch,delete}\n    install             Install a version of 'Chrome for Testing' assets\n    path                Show the installation path of assets and exit\n    list                List versions\n    switch              Switch the active version\n    delete              Delete an installed version\n\nReference: https://github.com/GoogleChromeLabs/chrome-for-testing\n```\n\n```bash\n(venv) $ c4t install --help\nusage: c4t install [-h] [--version VERSION] [-l]\n\nInstall a version of 'Chrome for Testing' assets.\n\noptions:\n  -h, --help            show this help message and exit\n  --version VERSION     The version of 'Chrome for Testing' assets to install. The default is 'latest'\n  -l, --last-known-good-version\n                        Install a last known good version from a list\n```\n\n#### Install the default, the latest stable version\n\n```bash\n# By default assets are installed in ${HOME}/.c4t-assets\n# To use a different path, set the C4T_PATH_TO_ASSETS environment variable.\n# e.g.: export C4T_PATH_TO_ASSETS=\u003cpath\u003e\n# Add this export to your .bashrc so the path is set for every bash session.\n(venv) $ c4t install\n```\n\n#### Install a specific version\n\n```bash\n(venv) $ c4t install --version 116.0.5794.0\n```\n\n#### Install a last known good version from a list\n\n```bash\n# Notice the list also indicates versions you already installed\n(venv) $ c4t install -l\n0 - Stable version=124.0.6367.91, revision=1274542, installed\n1 - Beta version=125.0.6422.26, revision=1287751\n2 - Dev version=126.0.6439.0, revision=1292160, installed\n3 - Canary version=126.0.6449.0, revision=1293886\nSelect a version by number:\n```\n\n#### Show installation path of assets\n\n```bash\n(venv) $ c4t path\nPath to assets: /home/p4irin/.c4t-assets\n```\n\n#### Show the currently active version\n\n```bash\n(venv) $ c4t list --active\nActive version of 'Chrome for Testing' assets installed: 124.0.6367.91\n```\n\n#### Show a list of installed versions\n\n```bash\n# Notice the active version is marked 'active'\n(venv) $ c4t list --installed\n0 - 116.0.5794.0\n1 - 124.0.6367.91, active\n2 - 125.0.6422.14\n3 - 126.0.6439.0\n```\n\n#### Show a list of last known good versions\n\n```bash\n(venv) $ c4t list --last-known-good-versions\n0 - Stable version=124.0.6367.91, revision=1274542, installed\n1 - Beta version=125.0.6422.26, revision=1287751\n2 - Dev version=126.0.6439.0, revision=1292160, installed\n3 - Canary version=126.0.6449.0, revision=1293886\n```\n\n#### Switch active version\n\n```bash\n(venv) $ c4t switch\n0 - 116.0.5794.0\n1 - 124.0.6367.91, active\n2 - 125.0.6422.14\n3 - 126.0.6439.0\nSelect a version by number: 0\nCreating symlink to chrome version 116.0.5794.0\nCreating symlink to chromedriver version 116.0.5794.0\nActive version is now: 116.0.5794.0\n```\n\n### Common workflow\n\n1. Install one or more versions of Chrome for testing assets\n1. Set/switch the active version\n1. Run your Selenium Webdriver tests with the active version of Chrome for testing\n\nE.g., this allows for quickly switching back to a previous version of Chrome to run your tests against in case of a regression on a recent/latest version. For example, a test failing against the latest of Chrome, did it pass consistently on the previous version or is it flaky and in need for a more robust implementation?\n\n## Reference\n\n- [Blog](https://developer.chrome.com/blog/chrome-for-testing/)\n- [GitHub](https://github.com/GoogleChromeLabs/chrome-for-testing)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4irin%2Fc4t","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp4irin%2Fc4t","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4irin%2Fc4t/lists"}