If there are some browsers opened and I don't how many browsers are open, Now I want to close all the browsers that I don't know how many are opened.
What would be Descriptive programming for this in QTP using VB Script..???
Please send your answers.

Answer Posted / rangalnrt

set Objects = description.create
Objects("micclass").value = "Browser"

set Childs = Desktop.childobjects(Objects)

for i=0 to Childs.count-1 step 1

Browser("index:="&i).close

next

if Browser("index:=0").exist then

msgbox "Fail"

Else

msgbox "Pass"

End if

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Analyzing the checpoint results?

777


Can any one tell me about "Mapping Repository Parameter Values" and why we use it....??How to use it???Please, tell the preconditions also...........???? Thanks in Advance

1708


Explain the Different types of QTP test assets and their extensions?

831


Hello friends..... On which areas of an application we can not test with QTP

1814


What is the difference between the keyword view and expert view?

723


Tell me one scenario, the complex functionality you have automated in your project?

1711


Suppose you are using shared objects repository in your test and you want to split your present action? At that time shared object repository is single or it’s also splits?

880


how u will evaluate the tool for test automation?

1587


Is QTP Supports SWT applications? If yes, can you write a sample script for opening a new package in eclipse.

3259


How will you handle java tree in qtp?

815


What are the key elements available in test result window?

864


How to open a new test using quicktest professional (qtp)?

742


How is the Bitmap checkpoint different from Image checkpoint?

821


Hi, I am working on microsoft infopath forms..It is standalone form..(not dotnet or web.) . I am not able to indentify any objects in it.. I am currently using active accessibility in the macro for the same but its execution is too slow.. Kindly help in case you have better solution.

2649


In Test Directory, What are the contents in test case designing? if you prepare in excel sheet how u use thrw Test Directory?

1669