Suppose there are 10 browsers opened on desktop. I want to
close all browsers except one browser in QTP. Can any one
give the code for this?

Answer Posted / sharath

you can use descriptives programming concepts.
"CreationTime" is a QTP browser property, which indicates
the order in which browsers were opened.
To close 1st browser --> Browser("CreationTime:=0").Close
2nd browser --> Browser("CreationTime:=1").Close.
you can use a loop to close other 9 browsers..

Is This Answer Correct ?    17 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you list some technologies that support qtp?

541


How to record application running on the Virtual machine?

632


Explain how qtp identifies objects?

558


banking domain description for software tester for interview

3457


what is meant by source control?

1685






How you can decide which type of object repository you have to use?

691


In qtp is it possible to check broken links of a page?

571


How to create runtime property for an object?

1438


What is checkpoints for quicktest professional?

538


What are the views available in quicktest professional (qtp)?

563


How to Open FireFox using descriptive programing? If my question is not clear, i will give an Example To Open Internet Explorer, We use Set IE = CreateObject(InternetExplorer.Application) IE.Navigate "www.yahoo.com In the same i need to open yahoo.com in firefox. Can any one tell me what is the server name of firefox to create an object

2518


How often were they executed?

2024


If the weblist is identified as webelement,and by clicking on webelement if the values are displayed,and if the values the values also identified as webelement.then how to fetch the values through script?

4680


In qtp, how you can remove the spaces from string?

538


How do know the number of browsers opened?

617