6

I have a program that runs

`import webbrowser
 path = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
 webbrowser.register('chrome', None, webbrowser.BackgroundBrowser(path))
 chrome = webbrowser.get('chrome')
 chrome.open('chrome://newtab')`

Is there a way I can somehow make this program run in the background and prevent the window from popping up? I have tried chrome.open('chrome://newtab', autoraise=False), but the program still does not open the window in the background.

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
Jordan A.
  • 384
  • 1
  • 4
  • 17
  • By background, do you mean behind all the windows on a desktop or a background process? – metatoaster Sep 02 '15 at 04:50
  • I mean behind all of the windows, because it can be quite annoying if you are doing something while the program is running. – Jordan A. Sep 02 '15 at 04:53
  • You mean not displaying the browser at all or just don't changing focus to the browser ? – Cristiano Araujo Sep 03 '15 at 19:26
  • 2
    @Cristiano I don't want the browser to pop up every time the program runs. So I don't want to change focus to the browser. – Jordan A. Sep 04 '15 at 05:05
  • 1
    Any luck on this? Setting `autoraise=False` is still giving focus to the browser tab that is opened. On Windows using Google Chrome – Endyd Mar 06 '19 at 15:07

0 Answers0