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 do you perform testing on web based application using qtp 9.2?
What is the Maximum syncronization timeout in seconds in QTP 9.5
QTP 9.2, Issue: Creating Shared Object repository. I recorded 2 scripts. I exported the Object Repository to a shared location for the first script. Associated the exported repository to the first script and deleted the Local Repository for the First Script. Now Opened the Second script and try to Add the Local Object Repository of 2nd Script to Exported Object Repository. But I fail. Can anyone please help in providing steps that need to be followed in creating a shared object repository? Thanks in Advance.
give me the code to save all messages of inbox of gmail into a folder and notepad
If an application name is changing frequently i.e while recording it has name “Window1” and then while running its “Windows2” in this case how does QTP handle?
How many ways to configure the application in QTP,Explain
What is diff. between ordinal identifier INDEX and Location?
They asked by using qtp recording writing scripting
How to covert a String to an integer?
what testing activities u may want to automate?
Give the syntax to import/export xls into qtp.
how can i use text check point in descriptive programming. or else is there any way to compare the text in the application and the text in data table.