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

Answer Posted / guest

Set odesc=Description.Create
odesc("micclass").Value="Browser"
Set a=Desktop.ChildObjects(odesc)
For i = 0 To a.count-1
t=a(i).GetRoProperty("Title")
print t
If Trim(t)<>"xyz" Then
a(i).Close
End If
Next

--Ganesh

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the differences between functions and actions in UFT?

607


How to read a text file from QC using QTP. I would like to do something like this. But instead read a file from QC and NOT from my local drive. Set fso = CreateObject("Scripting.FileSystemObject") Set InputFile = fso.OpenTextFile("C:\test.txt", ForReading) Thanks

2753


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

1618


Does QTP record on Objects created on XWindows Environment?

1656


what is error and fault in terms of software quality?

1505






How to associate shared object repository to test in qtp?

503


Explain runtime dynamic settings?

2022


in my application,validation message has in japanise language.how to validate this message is appears properly or not

1516


If I give some thousand tests to execute in two days what do you do?

580


How to use descriptive programming?

605


What is the process of synchronizing qtp and aut?

566


Which scripting language used by quicktest professional (qtp)?

660


Explain types of output values?

564


i can done the project with QTP in that time i can say how many members in my team size?

1366


I want to grow as a Automation Engineer,Kindly help me in clearing my interview that what interviewer looks for as a Automation Engineer. I am having three years of experience in testing.

1621