Installing Chrome using Gradle Plugin

I was able to use a gradle plugin to install node-js, so I can integrate my app with phantom. I now need to install chrome on the fly as well, and I was wondering if there is a plugin for this. I’ve searched around, and the initial answer seems to be no. The closest I found was a plugin for Google Cloud, but that’s not what I’m looking for.
The specs are such that I need to allow users to choose which browser they want, and if it’s not available on their system, to download the binaries etc., into their project directory.
I have a suspicion that this doesn’t work for browsers like chrome, firefox, ie etc, I just wanted to make sure there wasn’t any other way around this problem.
thanks.

NodeJS is easy because it’s a developer tool. In addition to the traditional installers, it’s distributed as an archive that can easily be deployed on a base image. Writing a plugin to download an existing archive, extract the binary, and execute it is straight-forward automation, even with minor platform differences.

Browsers are hard because they’re designed almost exclusively for end users. There’s an installer, system interaction, and likely will write preferences in predetermined places. Package managers on linux may make the installation task more easily automated, but not across all the platforms.

It’s not impossible, but you would have to do a significant amount of work. You would be building/customizing binaries for each browser/platform combo you want to support so that they can be accessed and used in a fairly uniform way.

It seems unlikely a Gradle plugin will emerge to automate the browser installation as it is commonly accepted that browsers must be pre-installed in the environment and the effort to remove that requirement is seemingly close to prohibitive.

1 Like