Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to work with multiple browsers when opened in the window,
write the script for it

Answers were Sorted based on User's Feedback



How to work with multiple browsers when opened in the window, write the script for it..

Answer / nilanjan saha

Hi all,

We can handle the Multiple Browsers with the Creation Time
property of the Browser.

For the Browser we have Creation Time ordinal identifier.
First browser that opened after opening QTP by default gets
Creation Time:=0, next populates with 1,2 and so on...

We can also manipulate this value from Test Object property
window.

e.g:

Let 3 separate browsers are open. To work on the 2nd one we
can come up with following code:

Browser("CreationTime:=1").page("micclass:=page").Image("micclas:=Image","alt:=Continue
to Login").Click
wait(2)
Browser("CreationTime:=1").close

Please let me know if you found anything I missed.

Regards,
Nilanjan

Is This Answer Correct ?    1 Yes 1 No

How to work with multiple browsers when opened in the window, write the script for it..

Answer / nitin sharma

For working on multiple browser you have to use creationtime
or index property.
Use this code
'opening two application gmail and yahoo
Systemutil.Run"iexplore.exe"
Systemutil.Run"iexplore.exe"
Wait(10)

Browser("micclass:=Browser","creationtime:=0").Navigate"http://www.gmail.com"
Browser("micclass:=Browser","creationtime:=1").Page("micclass:=Page").Navigate"http://www.Yahoo.com"

'for closing all browser
While Browser("title:=.*","index:=0").Exist
Browser("title:=.*","index:=0").Close
Wend

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More QTP Interview Questions

what is testing process with QTP in organization

1 Answers   Tech Mahindra,


can any body tell me all of the release dates of QTP?????..... thanks in adv!

3 Answers  


Write a QTP script to print all the link names displayed in a web page

4 Answers   TCS, Virtusa,


I have two actions in my QTP test and two iterations in my DataSheet. I want to execute the Action 1 for the two iterations only after which i want to exceute the next Action2. How is this possible?

4 Answers  


How to capture data from images in QTP and produce them in Excel sheet ? please ans...

3 Answers   Sapient,


what is check point?

2 Answers  


In QTP for .net application which plug in is used? For Java Application which plug in is used ?

2 Answers   AppLabs, Fraze Tech,


How can you handle exceptions in qtp?

0 Answers  


How do you compare the structure of 2 tables in database and check whether they are similar using qtp.

0 Answers  


Output values? i want a practical example

0 Answers  


what type of frame work used in your company?

2 Answers   HCL,


What is the standard timing delay for web based application in qtp?

0 Answers  


Categories