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 have 3 browsers i want to give facebook url in 2 nd browser using qtp
What is the difference between browser sync and page sync in QTP?
Could you please any one give code for the following ? Scenario : Suppose a excel file contains 10 records and earch have 5 fields. how can i input this excel file for datadrive wizard ? Please explain
i want 8.2 and 9.2 dacuments plhelp any body sand it to my id sandhyat1@yahoo.co.in
how to validate email?email ie correct or not ?with below conditions. 1)before @(symbol) only alphbates and min 4 char to max 15 chars. 2)before @(symbol) only alphabates dont use ant special chars or numarics 3) after @(symbol) only one dot(.)symbol for ex:abc@gmail.com it is valid email or not based above conditons
Explain how qtp identifies object?
How to retrive the property of an object?
Is there any relation between Keyword Driven Framework and Recording modes provided in QTP( whether Recording modes are applied on keyword driven framework or not?)
Give the syntax to load function at run time.
Which functionalities of QTP used in banking project?
can u explain about QTP Frameworks? what are the framework types are available? and How to set or create frame work for a application? Explain briefly?(Also give me one example)
How function returns a value?