Write a Fucntion to close all Opened browser expect desired
one?
Answers were Sorted based on User's Feedback
Answer / 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 |
why variable name should not exceed 255 characters?
What are events in the vbscript language?
How regexp.execute method works?
how to increase the values in text box in a given text box increament by two values by clicking on button
How to select a value from a list box by using Selenium web-driver?
Find Out Length of an array without using Ubound?
How you can call vbscript functions?
join all the array values without using join function?
Explain about .wsf files?
What are the differences between Visual Basic, VBA and VBScript? When would it be appropriate to use one as opposed to another?
Which data type/types are supported by vbscript language and what are their specialties?
What are the environments supported by vbscript language?