Ad Home

Theme images by kelvinjay. Powered by Blogger.

Travel

Header Ads

Java

Selenium

UFT

Framework

General QA Concept

BDD

» » 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()
objBrowser("micclass").value="Browser"
Set sBrowsers=desktop.childobjects(objBrowser)
ibCount=sBrowsers.count
If ibCount<>0 Then
Browser_Count=ibCount
Else Browser_Count=1
End if
Set objBrowser=Nothing
Set sBrowsers=Nothing
End Function


«
Next
Newer Post
»
Previous
Older Post

1 comments:

  1. Good Approach......It is really helpfull..Request you not to make it a Discussion blog.

    ReplyDelete