There is one parent browser and 'n' number of child browsers
on desktop. Write a code to close all the child browsers but
parent browser should not be closed.
Answer Posted / vishnu
'Create Description Object
Set oDesc = Description.Create
oDesc("micclass").Value = "Browser"
oDesc("openurl").Value = "about:Tabs"
'Loop through the collection and close each browser
If Desktop.ChildObjects(oDesc).Count > 0 Then
For X = Desktop.ChildObjects(oDesc).Count To 1 Step -1
Browser("CreationTime:="&X).Close
Next
End If
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
I am getting the "test object property" Description properties "toolkit class" value By using "gettoproperty" in run time But my problem is how to get Ordinal Identyfier's type and value Type is index, value is 0 How can i keep this values in to required place How can i get these values in runtime I have to insert these "index" and "value" into another area Is there any script for this like "gettoproperties","Getroproperties" If anybody knows,please help me .
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.
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
Discuss quicktest professional environment?
Suppose you are using shared objects repository in your test and you want to split your present action? At that time shared object repository is single or it’s also splits?
supose i hv to acsess some functionlaties of a test in 1 machin , some part other machin how can acsess?
How do you create regression test packs?
How many tabs are available to view your test in a test pane and what are they?
Explain the concept of object repository and how quicktest professional (qtp) recognises objects?
can u explain relative path architecture framework in qtp?
i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression
Write a script to customize the test results in PDF and HTML format.
Hi Friends, Would be great if you can provide the Model Question paper, Web site link or any reference s. Thanks & Regards, Byzoor,
What are the five challenges you faced in QTP?
Is qtp supports uni-code?