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
Write program for identifyig duplicates in flight Departing from and Arriving in mercury tours(web application).
Explain about tristate constants?
What is the difference between function and procedure?
What are the advantages of vbscript?
Illustrate briefly about the different types of statement
How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.
How regexp.execute method works?
Mention what is the main difference between function and sub-procedure?
How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'
Explain the constants in vbscript?
How to write VB script for login module?
if u ve resrevation for train and u get a number supose 1234xxxokie.after sucessul entering all required fields. now u put that number in search and want to chk wether these ar same or not if both ar same then its okie otherwise test fail.what would be the vb script code for it to compare these two values of different page.
What is the use of the date function in the vbscript language?
Which function is used in the vbscript language to convert the specified expression into a date type value?
Explain the string concatenation function in vbscript?