several browsers opened. write QTP script to close all browsers except gmail.



several browsers opened. write QTP script to close all browsers except gmail...

Answer / puspita

Dim d
Set d=Description.Create
d("micclass").value="Browser"
Set a=Desktop.ChildObjects(d)
For i=0 to a.count-1
s=a(i).GetROProperty("title")
If instr(1,s,"Gmail")=0 Then
a(i).Close
End If
Next

Is This Answer Correct ?    22 Yes 1 No

Post New Answer

More QTP Interview Questions

Actually what is Quality center..is it Test Director or some other tool..Anybody can expalain it in detail..Thanks in advance..

3 Answers   Sony,


How to switch between browser tabs? )moving from one tab to another tab)

1 Answers   CTS,


anybody wants to learn QTP with realtime implementations and complete framwork contact to this mail id ciraaj@gmail.com

1 Answers  


Where we write the FUNCTIONS, in Expert view (or) in any textfiles like Notepad and save it in Library functions folder? How to cal that functions to our script? How to save that functions to Function generator?

3 Answers  


Can we install QTP on remote server and access it as a web application on other system (client place)? If so please let me know. Thanks in advance, Ravi

2 Answers  






I have below user Defained function function AddTwo(ByVal a, ByVal b) Dim Ans Ans=a+b MsgBox Ans End function Now my question comes here...from given below methods which method is right to call above function?Which is Wrong and why? 1. AddTwo(2,4) 2. Call AddTwo(2,4) 3. AddTwo 2,4 4. Call AddTwo 2,4

1 Answers  


If u don't have any Knowledge on perticular application but they give that application to u for Testing ? Then How we wil move towards testing on that application?

16 Answers   Genpact, HP,


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?

0 Answers  


In QTP 8.2 there are lot of check points is this same in latest version QTP 9.5 ?

2 Answers  


can u tell me website address of VBscript with examples.

2 Answers  


How to add verification steps to tests?

1 Answers  


How to see the screens after running test in QTP?

1 Answers  


Categories