#coding=utf-8
import win32com.client
clsid=‘{9BA05972-F6A8-11CF-A442-00A0C90A8F39}‘
ShellWindows=win32com.client.Dispatch(clsid)
for i in range(ShellWindows.Count):
print i
# this is the titlebar value
print ShellWindows[i].LocationName
# this is the current URL
print ShellWindows[i].LocationURL
Python 找到已经存在IE实例
时间: 2024-11-06 07:08:30