If there are some browsers opened and I don't how many browsers are open, Now I want to close all the browsers that I don't know how many are opened.
What would be Descriptive programming for this in QTP using VB Script..???
Please send your answers.
Answer Posted / rangalnrt
set Objects = description.create
Objects("micclass").value = "Browser"
set Childs = Desktop.childobjects(Objects)
for i=0 to Childs.count-1 step 1
Browser("index:="&i).close
next
if Browser("index:=0").exist then
msgbox "Fail"
Else
msgbox "Pass"
End if
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
I need Major Help with a Script I recorded in QTP 9.5. I am recording scripts for a Web-based application(s) I have all the URLs for each application in Excel spreadhsheet so that QTP can pull that particular application from the spreadsheet and run it. The problem is QTP isn't recognizing one particular URL so when I hit run in QTP to run this script it opens the internet Explorer but isn't open the URL I have in the Excel spreadsheet. I've retyped the URL and still QTP won't open this Particular one for some reason. The site its self is working fine but for whatever reason QTP won't open it. How do I resolve this? I have a deadline of next Friday the 7th to complete this task so please help me in any way you can. Thanks in advance
what are the utilities and drivers
can anyone tell me from where i can download qtp demo or crack version
Tell me one scenario, the complex functionality you have automated in your project?
Which scripting language used by quicktest professional (qtp)?
Explain Descriptive Programming Types with Examples?
How you debug your script?
how did u use automating testing tools in ur job?
Plz Explain AUTOMATION REFERENCE MODEL?
How can I change object description or check point values in qtp?
Where we use data driver in qtp?
write script for bitmap image?
Hi, Hope you viewers are doing fine with good health. What are the steps and connection parameters to connect to Oracle db ? Can you connect with just the Oracle client or Oracle XE ? Cheers!!
How should I click on the right click menu objects When I trying to add the object properties to the OR.It is showing only Window(Window).Not all the objects of the window. Also while recording I found No script. How to solve this>.
Difference between test object and run time object?