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
What aspects of vbscript make it safe so that a web page using vbscript cannot destroy or corrupt information on a user's computer?
I need to get some data from data base and store this
(retrieved) data in a excel sheet using VB script in QTP9.0
I have created connection for data base
I have created as excels sheet by using
Set XL=CreateObject("Excel.Application")
XLworksheet.cells(1,1).value= rs.fields.item("<
How can constants be declared in the vbscript language?
How to assign a numeric value to a variable?
Mention what is the technology used by vb script?
how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.
Which operator is used to concatenate the 2 values in the vbscript language?
Explain about arrays in vb script?
give me any information abou vb script books learn quckly
Which data type/types are supported by vbscript language and what are their specialties?
What is event handling in vbscript?
How to throw an error in vbscript?
Mention how to create a cookie using vbscript?
If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?
How do you declare a variable in vbscript?