How can we close all webbrowsers which are opened in out
desctop?

Answers were Sorted based on User's Feedback



How can we close all webbrowsers which are opened in out desctop?..

Answer / venu

The following code can be used in order to close all the IE
browsers:

SystemUtil.CloseProcessByName "IEXPLORE.EXE"

Is This Answer Correct ?    10 Yes 0 No

How can we close all webbrowsers which are opened in out desctop?..

Answer / meenakshisundharam

If browser(xxxx).Exist then
browser(xxxx).close
End if

Is This Answer Correct ?    9 Yes 0 No

How can we close all webbrowsers which are opened in out desctop?..

Answer / syam

While Browser("CreationTime:=0").Exist
Browser("CreationTime:=0").Close
Wend

QTP Tip1: The first browser that opens receives the
value "CreationTime" = 0, the second browser
receives "CreationTime" = 1, and so on...

Is This Answer Correct ?    4 Yes 0 No

How can we close all webbrowsers which are opened in out desctop?..

Answer / d.selvakumar

SystemUtil.CloseProcessByName "iexplore.exe"
pls use small letters

Is This Answer Correct ?    1 Yes 0 No

How can we close all webbrowsers which are opened in out desctop?..

Answer / chandrashekar reddy

there are 2 ways to close the all browsers in qtp
1) we can use while..... wend 2) we can use
description.create method

1) while Browser("index:=0").exist (1)
browser(index:=0).close
wend

2) set ab=description.create
ab("micclass").value="Browser"
set obj=Desktop.childobjects(ab)
b=obj.count
msgbox b
for i= 0 to b-1
names=obj(i).getroproperty("name")
msgbox name
obj(i).close

Is This Answer Correct ?    1 Yes 0 No

How can we close all webbrowsers which are opened in out desctop?..

Answer / ambadas

please give ans

Is This Answer Correct ?    0 Yes 0 No

How can we close all webbrowsers which are opened in out desctop?..

Answer / joseph

Tested in tool -
Answer 1 is right
Answer 3 is right
Answer 5(1) - Update (browser(index:=0).close) to browser("index:=0").close
Answer 5(2) - Need to include 'Next' for 'For' loop

Is This Answer Correct ?    0 Yes 0 No

How can we close all webbrowsers which are opened in out desctop?..

Answer / ram shankar

visit below URL, you can get qtp browsers scripts

http://www.gcreddy.com/2010/01/qtp-web-testing-scripts.html

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More QTP Interview Questions

how can i pass parameters into function?

4 Answers   Livetek,


How does QTP identifes the object in the application?

1 Answers  


HI I want to know the detials of QTP certifications such as syllabus, study Materil etc. Can any provide me all these details?? my mail ID is krishnuvk@yahoo.com

0 Answers  


hi, i am trying to capture "web element" names in a web page, and i written the code like this,, with Browser("title:=") with .page("") .webelement("htmltag:=...").getroproperty("innertext") end with end with //////////////////////////////////////////////////////////////////////////////////// QTP RETURN ERROR like this: " object's description matches more than one of the objects currently displayed in your application. Add additional properties to the object description in order to uniquely identify the object" ok fine , i need to search another property other than "index" i use all the properties like class,text,innerhtml,innertext,visible=true,x , y,abs x ,abs y...but qtp returns error ..... in this webpage index is difficult to find? how to solve

1 Answers   IBM,


Is it possible to split an action? How?

0 Answers  






How to convert QTP's ObjectRepository.mdb file to xml file

1 Answers  


write a script for get the following result: username password frm the string1="A=username" string2="B=password"

3 Answers   Oracle,


What is environment variable in qtp and why to use it?

0 Answers  


Can objects recognised without repository?

5 Answers  


can i able to connect any version of qtp to any version qc

2 Answers  


I installed QTP 9.5 on vista. Can someone please provide me the license key of the same. Thanks, Avi

2 Answers   Xavient,


How can i select multiple values from drop down list using vb script in qtp? and wt is the script for clicking msg box box automatically with a specific time. Thanks in advance...Kalyani.

2 Answers   Accenture, CSC,


Categories