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 |
How many types of recording modes in qtp? Which will be used when?
what is the Debug view?
How to supress warnings from the "Test results page"?
How you will rate urself in QTP in the range of 0 to 5
If created one virtual object? Next time I changed the window position will it work?
What is synchronization? What are the ways you can synchronize?
Hi This is tanya actually im facing problem in Qtp actully some time QTP doesnot recoznise the recorded object due to which script is going to fail.so can you tell me how we can handle this situation and i have another concerened issue is that at the time of run New errors comes every time so how we can handle this sitauation how we can add Recovery scenarios to the script.some time application runs successfully and some time it produces new error thats why i am facing lot of problem please give me the sugeestion as soon as possible.
How to handle recovery scenario for a application crash.write script for this.
What is the virtual object?
Explain the keyword driven framework for the window based application complete creation of library files,env file,test data,recovery file,excel file ,repository etc and as a test engineer how is ur approach
How to retrieve the object properties at runtime without the usage of GetROProperty?
How comfortable are you in VB scripting?