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 |
Hi Guys, In one of my interviews, I was asked to Write a paragaraph explaining how much scripting I did in QTP? I don't know where to start and what to write. So I need your help in writing that.
Can any one tell me how to write a script for selecting open option in File menu of A word document.here you have to add objects to OR.try like that and give me the ans.i asked this question to so many but no one knows.if any one know the answer plz let me know
.qfl extension for which file? where vl use it
Want to verify notepad reports using QTP framework or any other BV script method. Can anyone share the method to achieve it? Eg. Person Name is the header and the actual name is John then how can we verify weather person name is John
How to check the URL using Automation tool QTP
Functions call by reference and call by value. i want the diff b/n these 2 and how will be the script for this?in which situation we use these 2..?pls explain me clearly
What is post recovery scenario?
How can we close all webbrowsers which are opened in out desktop?
what is object repository?
When should I use smart identification?
Can we create a qtp test from qc?
What is the use of Debug Viewer?