4

I have a script in my automation tests (built using protractor(5.4.0) and runs on Headless Chrome in Circle CI using Docker) which installs currently the latest chrome browser for me:

apt-get update && apt-get -y install libxss1 libappindicator1 libindicator7 curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb dpkg -i ./google-chrome*.deb apt-get install -yf 

This script downloads me the latest chrome browser version available.

Is there any way to get older version of chrome.deb and install via curl as there are few things I suspect aren't running since chrome updated and I would like to test with a older version once.

I found few older browser versions to install on websites like slimjet, ubunutu but would like to know if I can get it via https://dl.google.com or if there is any better way to do this.

2 Answers 2

7

For deb package at Ubuntu - Chrome:

CHROME_VERSION=77.0.3865.120-1 wget --no-check-certificate https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb dpkg -i google-chrome-stable_${CHROME_VERSION}_amd64.deb || apt -y -f install rm google-chrome-stable_${CHROME_VERSION}_amd64.deb; 

For Chromium: For more info about old Chromium, please refer to: https://github.com/Bugazelle/chromium-all-old-stable-versions

CHROMIUM_VERSION=77.0.3865.120 wget --no-check-certificate https://raw.githubusercontent.com/Bugazelle/chromium-all-old-stable-versions/master/chromium.stable.json download=$(jq -r ".linux64.\"${CHROMIUM_VERSION}\".download_url" chromium.stable.json) position=$(jq -r ".linux64.\"${CHROMIUM_VERSION}\".download_position" chromium.stable.json) echo "download url is: ${download}" echo "position is: ${position}" wget --no-check-certificate -O chromium.zip ${download} 
Sign up to request clarification or add additional context in comments.

1 Comment

Nice, working for me (tested Ubuntu - Chrome). Also check here for version numbers: ubuntuupdates.org/package/google_chrome/stable/main/base/…
1
ENV CHROME_VERSION "99.0.4844.84-1" RUN set -ex && \ apt-get update -qqy && \ wget --no-check-certificate https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb && \ apt-get install -qqyf ./google-chrome-stable_${CHROME_VERSION}_amd64.deb && \ rm google-chrome-stable_${CHROME_VERSION}_amd64.deb 

1 Comment

It's important to provide not only code, but also a clear and concise explanation of what the code is doing and why it is relevant to the question or problem at hand. This helps other users understand the context and purpose of the code, and can also make it easier for them to understand how to modify or extend the code to fit their own needs. @yunixon.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.