write a script to close all open browser in qtp except one
browser whose name is xyz
Answer Posted / pravati
set obj=Description.create()
obj("micclass").value="Browser"
set brsrobj=Desktop.childobjects(obj)
msgbox brsrobj.count
for i=0 to brsrobj.count -1
x=Browser("micclass:=Browser","creationTime:=&i-1").Getroproperty("name")
if instr(x,"xyz')=0 Then
Browser("micclass:=Browser","creationTime:=&i-1").close
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain the concept of object repository & how qtp recognizes objects?
Can anybody let me know how to test the Drag and drop feature of the column in a .net application...eg..i hav to test the drag and drog feature of a table(swftable) in a application..plze help!!
Write a script to verify font style and color of a windows object using descriptive programming
How to Upgrade or support firefox 2.0 version on QTP 9.0? I have installed QTP 9.0 and installed firefox 2.0. But in REcord and Run Settings, it shows firefox 1.5 in Web tab for browser selection.
What is the latest version of qtp?
How do you create new test sets in td?
what is stepin & stepout?
What does mean by Scope of Automation?n How we defined it?
What is an expert view and keyword view?
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
Explain the differences between table and db checkpoints?
wht is Manual Testing Frame work. Pls anybody can give appropriate answers
How can we extract data like "Details","Result","Time" from the 'Run Error' result generated in QTP after run time errors are generated during a run & import the details etc...into excel sheet
What Folder Structure following in Keyword Driven Frame work?
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What's the difference between them? How to handle script issues?