Aug-28-2017, 09:00 AM
Hi all
I am using python 2 on a Raspberry Pi microcomputer.
What I am trying to achieve is fairly straightforward. I have a URL which is stored in a string called A. First I want to open a web page using A as the url. That is easy to do.
import webbrowser
webbrowser.open(A)
Now after a minute or so A changes so I want to close down my browser window and then open up a new browser window using A again.
The problem is that I can't find a command to close the browser window. Solutions I have seen suggest using the kill function and also selenium but all the scripts I have tried result in errors.
Can someone please help with a simple solution that opens and closes a browser window with a web page in it?
Thanks for your patience
Peter
I am using python 2 on a Raspberry Pi microcomputer.
What I am trying to achieve is fairly straightforward. I have a URL which is stored in a string called A. First I want to open a web page using A as the url. That is easy to do.
import webbrowser
webbrowser.open(A)
Now after a minute or so A changes so I want to close down my browser window and then open up a new browser window using A again.
The problem is that I can't find a command to close the browser window. Solutions I have seen suggest using the kill function and also selenium but all the scripts I have tried result in errors.
Can someone please help with a simple solution that opens and closes a browser window with a web page in it?
Thanks for your patience
Peter