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

desribe a situation where u faced a stressful situation and how did u cope with it

1413


What is difference in global and action sheet in qtp?

614


How can I change object description or check point values in qtp?

559


What are the types of object repositories? Which one is you are using?

634


Tell me about your project? please help me how to tell about insurance project

1537






How will you test a stapler?

599


Hi.. I want to do parametrization for selecting perticular flighr say XYZ by using local table: criteria: 1.If flight is available msgbox "Flight is available" and then select flight from flight table and click to ok button after that as enter username and ticket no and then stop 2. otherwise msgbox " Flight is not available" and stop Please help me out ..and let me know your responses on dipak.bachhav@gmail.com Regard, Dipak

1633


Explain runtime dynamic settings?

2028


am not having intrest in coding lang like c c++ java etc can i choose Testing tools as my carrier and please suggest me which tool is good (suitable for me)

1284


Discuss quicktest professional environment?

592


Explain the difference between data driven testing and parameterization ?

592


Hi all can any one give me roles and responsibilities for QTP (not WINRUNNER)

3225


Why do you create a text checkpoint on a Web application? What is the purpose of the Close method?

1362


For QTP Test Engineer, What is his contribution to the Project? Means, As as automation test engineer what is his role in the current project?

1747


How many types of recording facility are available in quicktest professional?

567