I would suggest taking a look at Vagrant Up, Packer, etc., from HashiCorp the have both Open Source tools and commercial offerings to allow you to specify & manage the images that your VMs are based on, the software that gets installed and the set-up of the images based on simple, version controllable, text files.
You could take a look at SikuliX which allows testing of just about anything by actually looking at the screen and locating controls to operate, comparing the results, etc. with images.
As such it doesn't require any internal knowledge of the browser, page content, etc. - Your script tells it to issue commands, look for and operate controls, etc.
To quote ...