Open and Close Browser from Python

Pada posting tentang 'Open and Close Browser from Python' ini akan penulis berikan contoh skrip untuk memanggil dan menutup browser dengan menggunakan python.


Dibawah ini contoh skrip tersebut.


def open_ie(url):
    ie = webbrowser.get(webbrowser.iexplore)   
    ie.open(url);

def close_ie():
    try:
        os.system("taskkill /im iexplore.exe /f")
    except Exception as exc:
        pass

Semoga posting tentang 'Open and Close Browser from Python' diatas dapat bermanfaat.


Salam,

Popular posts from this blog

SmartObject property ID is a required property for selected method Create. Value must be set.

Cara inject USB 3.0 Driver pada instalasi Windows - How to Inject USB 3.0 Driver in Windows 7

Python Font Color in Console