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.
Answers were Sorted based on User's Feedback
systemutil.CloseProcessbyName("iexplore.exe"
Is This Answer Correct ? | 1 Yes | 0 No |
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 |
Answer / kaps
'Check if this is working
Dim TrueOrFalse
Do while("True")
TrueOrFalse = Browser("index:=0").Exist(2)
if(TrueOrFalse = "False") then
exit do
else
Browser("index:=0").close
end if
Loop
Is This Answer Correct ? | 0 Yes | 2 No |
i need to add 1000 users in a domain i written the script for that and it is running successfuly but the problem is that my system is not the user of that domain in which i have to add users so for adding users in that domain i have to install qtp on that another system, can anybody suggest me the way to add those users from my system ultimately i want to know how to access remote computer through script
Is it possible to merge two object repository files in qtp?
explain keyword driven framework?
what we do after completion of functional and regression testing
what is the difference between data driver & data driven and driver script?
I have a string "Redfort is in Delhi" how do u write vbscript for " Delhi in is Redfort"
how do pass parameters from one action to another action
What’s the QTP testing process?
How to invoke QTP using Dos prompt ?
What is positive test case and Negative Test case? What is the meaning of Real World Scenario's?
What are metrics and matrix?
what is run-time object in qtp? explain with example?