I
I
Ilya2021-07-21 13:09:16
Python
Ilya, 2021-07-21 13:09:16

How to get google chrome browser path in python?

Hello everyone, I would like to know how to get the absolute path to the Google Chrome browser?
Default browser path during installation: C:\Program Files\Google\Chrome\Application\chrome.exe

And if the user specifies a different path, how could I recognize it? I will be glad for any help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2021-07-21
@stead

like this

J
Jlad, 2021-07-21
@Jlad

Of course this is very stupid, but for example:

path_to_google_chrome = input("Write your path to google chrome") #Напишите путь к браузеру
print(path_to_google_chrome) #Выводим переменную

Sorry for the possibly stupid answer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question