I tried setting autoraise to False and new to 0, but the entire window continues to open. Any help?

Hello everyone, I'm using webbrowser.open('url') to open a web page. I want to just open the webpage in the background and not have the window raise when the command is executed. I tried setting autoraise to False and new to 0, but the entire window continues to open. Any help?
You already invited:

Aamir

Upvotes from:

You should try with some other browser than your default one. I checked the source code of webbrowser module and it seems for some browsers this functionality of autoraise is supported and some it is not. You can check it yourself by import inspect, webbrowser; inspect.getsource(webbrowser)
 
It might be that even for those which are supported, you still need to raise them for the first them and it might work in subsequent ones.
 
Otherwise you can look at Selenium or headless browsers. There is also lynx and other command line browsers.

If you wanna answer this question please Login or Register