Wednesday, January 21, 2009

How to Count and close all open Browsers?

' Create description for Browser
Set strBrowser=Description.Create
strBrowser("micclass").value="Browser"
Set strBrowserObject=Desktop.ChildObjects(strBrowser)
' get the Open browsers count
BrowserCnt=strBrowserObject.count

For i=0 to BrowserCnt-1
' Get the open browsers name
BrowserName=strBrowserObject(i).getroproperty("name")
' close the open browser
strBrowserObject(i).Close
Next

No comments:

Post a Comment