Header Ads

How to Calculate Number of Opened Browsers in QTP

Most of the time I have seen my juniors are struggling about how to calculate number of open browsers in QTP.I tried a simple way so that that method which will calculate number of opened browsers through QTP.

Function Browser_Count()
Set objBrowser =description.create()
Set sBrowsers=desktop.childobjects(objBrowser)
If ibCount<>0 Then
Else Browser_Count=1
End if
Set objBrowser=Nothing
Set sBrowsers=Nothing
End Function

Powered by Blogger.