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 / sireesha
If you want to close all browsers except gmail browser then you will follow this code.
set ObjDesk = Description.Creation
ObjDesk("micclass").Value="Browser"
set ObjDec =Desktop.ChildObjects(ObjDesk)
BroCount=ObjDec.Count
msgbox BroCount
if BroCount >0 then
for i=BroCount-1 to 0 step-1
if Instr(1,Browser("CreationTime=&i").GetRoproperty("name"),"gmail")=0 then
Browser("CreationTime:=&i").Close
End If
Next
End If
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Where we can use the analog mode and where we can use the low – level mode?
How many add-ins comes by default with quicktest professional (qtp)?
Object repositories types, which and when to use?
What are the features and benefits of quick test pro (qtp 8.0)?
what is clean sweep?
write a script to verify the image path(src property) of the images which are in web pages.
How many types of recording modes in the qtp?
Name the different types of recording modes?
What are the features of quick test pro(qtp)?
Explain data driven framework?
Is it possible to switch between recording modes during a test creation?
What is smart identification in QTP?
Explain the features of quick test pro(qtp)?
Hi Friends, Im planning to do certifcation in mercury Automation Tool QTP.But I Didnt get any clear details regarding course syllabus, fees, where to approach, and which certification would be useful for the experienced testers? can any one send me the details?
Hi frens! I am testing VB project with MS Access database. At add button click my record is storing in data table and it is shown in datagrid. So at Delete button click i want to check datagrid rows 9before and after delete). so how can i do it using descriptive programming?