Write a Fucntion to close all Opened browser expect desired
one?
Answer Posted / sojan davis
Function WebLogOff()
Dim oDesc, x
'Create a description object
Set oDesc = Description.Create
oDesc( "micclass" ).Value = "Browser"
'Close all browsers except ""
If Desktop.ChildObjects(oDesc).Count > 0 Then
For x = Desktop.ChildObjects(oDesc).Count - 1 To 0
Step -1
If InStr(1, Browser("creationtime:="&
x).GetROProperty("name"), "NAME OF PAGE") = 0 Then
Browser( "creationtime:=" & x ).Close
End If
Next
End If
End Function
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?
How will you convert a string to lower case string using vbscript?
How can constants be declared in the vbscript language?
Write a Script for ATM in QTP
When are redim statement and preserve keyword used in the vbscript language?
What is the purpose of on error resume next statement?
Capture the Unique label changes on google home page for I am feeling lucky button and save those label changes to Notepad Note: Using QTP
What are the different types of loops available in the vbscript language?
What is the purpose of drive object of scripting.filesystemobject class in vbscript?
Which operator can be used to check if two numbers are equal or not in vbscript?
Mention what is the technology used by vb script?
Hellow friends, I am learning QTP,but here problem is VB script. please guide me how to learn VB script w.r.t QTP and if you know any books tell me or if you have any materials or any use full material or any else w.r.t QTP please post me p.p.sekhar
how to automatically update the sql server2005 database records when insert in vb6?
What if you do not specify anything when you call a procedure?
What is vbscript language used for and which earlier language is it modeled upon?