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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Hello everyone! I am just writing a small test for a windows application. I have a problem with a text output value. The value i am trying to catch is presented in a scrollable textbox. When the text is too long, only a portion of it gets captured. Do you have any experience with this?

2337


Hi, Can anyone please tell me how to connect the QC with QTP using QTP script? Thanks in advance

1679


What are the ways you can synchronize?

759


Are Shared ORs read-only?

841


If u r using library files (Instead of Check Points) , How do u do bitmap check ?

1701


Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.

1747


how can you do retesting (datadriven test) using notepad amd by using functions NOTE u should not use datatable methods

1612


Have you faced any problems with object repository?

796


What is QTP testing process?

807


Hello Everyone, Please provide me the practical example of business component concept of QTP.Like how to create business component,how to connect the quality center etc.... Thanks in advance, Gaytri

1651


Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.

1771


In qtp, how you can get the last character from a string?

742


Can any one brief some detail on how the shared and action object repository utilized/implemented in a real time project. I already know how to make shared object repositor by saving OR as .tsr extension..I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thanks

2130


suppose in the middle of the project QTP will not work properly, then what do u do? and ur team?

1587


How to Test the mainframe application?

2034