How can we close all webbrowsers which are opened in out
desctop?
Answers were Sorted based on User's Feedback
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 |
Answer / meenakshisundharam
If browser(xxxx).Exist then
browser(xxxx).close
End if
| Is This Answer Correct ? | 9 Yes | 0 No |
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 |
Answer / d.selvakumar
SystemUtil.CloseProcessByName "iexplore.exe"
pls use small letters
| Is This Answer Correct ? | 1 Yes | 0 No |
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 |
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 |
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 |
Does Low-level recording capture mouse movements?
How to compare source and target database in testing? Can anybody please tell me in detail the procedure how to compare it?
How to Practice QTP Scripts?
How can i test an application like Google Earth.In my application data will be fetched from a oracle database based upon which graphs are generated..so these all are dynamic..how can i use qtp here..alongwith that how can i test the map generated by a satellite just like google earth..
How do you return a value from a function
Add parameters during time in each row in one column
Hi, is it possible for recording shortcut key during record session? The application on which I am working is web based application. This application has several shortcut key associated with menu option. I have succesfully recorded all menu option but unable to record shortcut key.
Hi, I have 2 dropdown listboxes called region and city/area. It needs to select one region(Santa Clara) and one city/Area (Sunnyvale).So I put this in the for loop and I am storing the Items in the variable called itemname. The regions value will get changed,so I used reg expression for this regions. This is my code Browser("MLSListings.com").Page("MLSListings.com").Link("» County/Area").Click Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Check CheckPoint("regions") ListSize=Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetTOProperty("items count") For i = 1 To ListSize-1 Itemname =Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetItem(i+1) Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Select Itemname ................. If I run the script,I am getting the following error, Cannot identify the specified item of the regions object. Confirm that the specified item is included in the object's item collection. Any Help? Thank you, Uma
w is recovery senario manager
3.How to record a word doc using qtp i.e open a word doc,type something and save the doc can someone send me the code.
what is the test object?
what is exact difference between smoke and sanity testing?