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

Differences between text and test area checkpoints?

662


Explain the features and benefits of quick test pro(qtp)?

610


what is output value in QTP and how it can be used in automation testing

1547


How to handle the exceptions using recovery secnario manager in quicktest professional (qtp)?

729


If I change the object name in one action will it be updated in all the actions? Or not?

696






what are the issues we will get when there is migration from QTP 8.2 to QTP 10.0? Is there any problem in executing scripts of 8.2 on 10.0?

1542


What is the extension of the qtp local repository?

647


What is the extension of the recovery scenario file in qtp?

632


An action has both shared and local OR associated with it and both have the same object in them. In the test which one will be considered?

658


how to test load test and block box testing an a web based application pls give ans briefly

1444


Explain the concept of how quicktest professional (qtp) identifies object?

666


how u will evaluate the tool for test automation?

1459


hi in real time who will execute the qtp test scripts? my faculty said, in a companty automation testers are written the test scripts and manual testers are execute the test scripts...IS IT RIGHT OR NOT?

2994


How many ways is to parameterize the value?

698


Give the syntax to load function at run time.

738