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

How many types of recording modes are there?

0 Answers  


Which functionalities of QTP used in banking project? pls any say answer?

0 Answers  


Expalin Text/Text Area Checkpoint

1 Answers   Crea,


Hi, I have 2 dropdown listboxes called region and city/area. It needs to select one region(Santa Clara) and one city/Area (Sunnyvale).So I put this in the for loop and I am storing the Items in the variable called itemname. The regions value will get changed,so I used reg expression for this regions. This is my code Browser("MLSListings.com").Page("MLSListings.com").Link("» County/Area").Click Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Check CheckPoint("regions") ListSize=Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetTOProperty("items count") For i = 1 To ListSize-1 Itemname =Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetItem(i+1) Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Select Itemname ................. If I run the script,I am getting the following error, Cannot identify the specified item of the regions object. Confirm that the specified item is included in the object's item collection. Any Help? Thank you, Uma

0 Answers  


How can we log a defect in Testdirector from Q.T.P ?

2 Answers   EDS,






How to Identify broken links in QTP

2 Answers   Ness Technologies,


Can abody explain me Send keys concept

1 Answers   Cap Gemini,


What is difference between QC and TD?

8 Answers  


Write test cases for copy and past password in password field ?

0 Answers  


How to handle Recovery scenario in QTP. give detailed explanation about recovery scenario.

4 Answers   Arsin Systems,


In a web page, one web table is present which is dynamic. In that table one of the column has links with the same inner text. write a script so that i need to click the third link.

3 Answers  


with out using import sheet came is it possible to get the excel sheet ?

2 Answers   Ordain Solutions,


Categories