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 / rico
just made a small correction. Here goes the updated answer
Set browserDesc = Description.Create()
browserDesc(”application version”).Value = “internet
explorer 6"
Set Allbrowsers = DeskTop.ChildObjects(browserDesc)
BrowserCnt = Allbrowsers.Count
For i = 0 To (browserCnt -2)
Allbrowsers(i).Close
Next
Set browserColl = Nothing
Set browserDesc = Nothing
| Is This Answer Correct ? | 7 Yes | 7 No |
Post New Answer View All Answers
What is a recovery scenario?
What are the various automation frameworks available in qtp?
Can anyone tell me how i used QTP 9.2 use for GIS based S/w with an example?
How can I use Call dlls in QTP ?
What is checkpoint in qtp?
How can you identify the browser and its information using QTP script?
i have a doubt can anyone tell me where are scripts stored while using QTP.Tell me the exact procedure takes place in real time?like how we call scripts how to proceed after writing scripts?how scripts are executed etc?i heard some use Qc whether others dont use.so tell me whole procedure for both the things it will be a very big help.as i have interview i want to have whole idea on this.its very urgent.
Could you please any one give code for the following ? Scenario : Suppose a excel file contains 10 records and earch have 5 fields. how can i input this excel file for datadrive wizard ? Please explain
What are the features supported by UFT?
Why we load add-ins in qtp?
How does qtp identify gui object?
What are the features of quick test pro(qtp)?
I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...
I need to pull the data from the page which in row, column vice into excel sheet, how can it be done using QTP? eg: Name Dept xyz gdty i need the same data to be exported in excel sheet.
Some time when i wanna learn the object i face issue like i am not able learn the object in proper manner... eg:for text bo on web page it should learn as webedit but some times it reads as winobject:internetexpoler-server, because of this i have to uninstall the qtp and re-install it again when i do this it reads the object perfectly.....plz suggest the soln