write a script to close all open browser in qtp except one
browser whose name is xyz

Answer Posted / milan das

Set objbrowser=description.Create
objbrowser("micClass").value="Browser"

Set objbrwcnt=Desktop.ChildObjects(objbrowser)

msgbox objbrwcnt.count

For i=0 to objbrwcnt.count -1

If objbrwcnt(i).GetRoProperty("name")<>"xyz" Then

objbrwcnt(i).close

End If

Next

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What should we say if interviewer asks "What is ur project architecture?".......Can any one help me with clear information.?????????

1715


.have you ever written compiled module? if yes , tell me about some of the function that you wrote.

1680


How the exception handling can be done using quicktest professional?

538


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

1895


How to create runtime property for an object?

1446






Explain about business process component? types and usage?

1559


how do i know how to use tools

1445


Could anyone help me for the below scenario: i am using the descriptive programming for my account, in which we have to generate the contract in the MS-word. when i generate this doc, we need to click on enable macros to continue further. but i am unable to make qtp to click on this. if anybody faced the problem like this??? pls help to get it resolved? Thanks in advance

1405


what is vmodel?advantages and disadvantages of vmodel?

1612


Your roles and responsibilities and daily tasks? (As automation tester)

2576


What does mean by Scope of Automation?n How we defined it?

1570


How can we extract data like "Details","Result","Time" from the 'Run Error' result generated in QTP after run time errors are generated during a run & import the details etc...into excel sheet

1536


banking project description for software tester

7020


What is the use of running the scripts in Hidden-mode in UFT?

680


What is difference in global and action sheet in qtp?

606