Installing Chrome browser on an Agent

Vladimir Varbanov 0 Reputation points
2025-02-24T10:18:44.6+00:00

Hello there,

I'm trying to run my unit tests with Chrome headless and I need to the install Google Chrome on an Azure agent. I'm wondering how can I do that. I tried a few founds over the net:

like this,

also with:


steps:

# Install Google Chrome on the virtual machine

- powershell: |

    $chromeInstaller = "chrome_installer.exe"

    Invoke-WebRequest -Uri "https://dl.google.com/chrome/install/latest/chrome_installer.exe" -OutFile $chromeInstaller

    Start-Process -FilePath $chromeInstaller -ArgumentList "/silent", "/install" -NoNewWindow -Wait

    Remove-Item -Path $chromeInstaller

  displayName: 'Install Google Chrome'

and also with chocolatey, but I'm constantly getting errors.

My question is:

is there a convinient way to install google chrome browser before other dependencies of my project?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,443 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.