1

I use AVG's Secure Browser for searching the web. I'm wanting to write a python script with the selenium package, but I don't use Chrome, Firefox, or other popular. Is there a way of telling selenium which Browser I want to use by showing it the path the Browser is located in, on my machine?

The browser I use is currently found in:

C:\Program Files (x86)\AVG\Browser\Application\AVGBrowser.exe

on my system. The browser acts like Chrome and uses the Chrome Web Store the download extensions

About the Settings:

AVG Secure Browser is made possible by the Chromium open source project and other open source software.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
t0mas
  • 127
  • 14

1 Answers1

0

As the AVG Secure Browser uses the Chromium engine you just need to pass the absolute path of the AVG Secure Browser binary through the binary_location property of ChromeOptions as follows:

from selenium import webdriver

option = webdriver.ChromeOptions()
option.binary_location = r'C:\Program Files (x86)\AVG\Browser\Application\AVGBrowser.exe'
driver = webdriver.Chrome(executable_path=r'C:\WebDrivers\chromedriver.exe', options=option)
driver.get("https://www.google.com")

Reference

You can find a couple of relevant discussions in:

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • @t0mas That seems to be a different usecase all together. Can you raise a new question with your new requirement please? – undetected Selenium Jul 01 '20 at 15:33
  • Thanks! I've got the right browser working now. but i added the `driver.quit()` function, yet it doesn't close the window. It just gives me an error. `Message: Service C:\Program Files (x86)\AVG\Browser\Application\AVGBrowser.exe unexpectedly exited. Status code was: 0` – t0mas Jul 01 '20 at 15:33
  • [New question](https://stackoverflow.com/q/62680396/12103053) – t0mas Jul 01 '20 at 15:40