Quick test professional

QTP Tips QTP codes QTP Faqs and more

GET NAMES OF ALL OPEN BROWSERS

Set bDesc = Description.Create()

bDesc(“application version”).Value = “internet explorer 6”

Set bColl = DeskTop.ChildObjects(bDesc)

Cnt = bColl.Count

MsgBox “There are total: “&Cnt&”browsers opened”

 For i = 0 To (Cnt -1)

MsgBox “Browser : “&i&” has title: “& bColl(i).GetROProperty(“title”)

Next ‘ i

 Set bColl = Nothing

Set bDesc = Nothing

Author: Mohan Kakarla

Advertisements

February 14, 2008 - Posted by | Browser Scripts | , , , , , , , ,

3 Comments »

  1. Thank you for the script. I have 3 objects(username, password, and login button) across 5 different site. Can you help me use DP to enter these details and click on login when any of the 5 sites are opened.

    Thanks in advance

    Comment by Yesh | December 3, 2008 | Reply

  2. How do get I ‘InnerText’ Property of a Link at Runtime?

    Comment by Sankha Mukherjee | January 10, 2011 | Reply

  3. this program not execuited

    it shows error like ” General run error”

    Comment by swathi | August 3, 2011 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: