Write a Fucntion to close all Opened browser expect desired
one?

Answers were Sorted based on User's Feedback



Write a Fucntion to close all Opened browser expect desired one?..

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

Write a Fucntion to close all Opened browser expect desired one?..

Answer / sha

Thanks sojan

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

How to get the length of the string by making use of the string function?

0 Answers  


What is Querystring collection?

0 Answers  


How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?

10 Answers   Cap Gemini, CTS,


Hi, Anybody could you Please tell me How to write the script for Checking whether given number is Prime Number or not..Thanks in Advance

6 Answers   Amazon,


How to Import data from a file (file is on the desktop) to the data table

2 Answers   IBM,






Mention what if you do not specify anything when you call a procedure?

0 Answers  


How many types of procedures are available in the vbscript language?

0 Answers  


hi i am trying for testing job for 3+ experience(fake) can u suggest me what type of projects i can keep in my resume and how much of knoeledge i should have abt that project.thnks in advance.urgt plz

0 Answers  


What is the use of the date function in the vbscript language?

0 Answers  


where can i learn VB scripint ?

0 Answers   Satyam,


If anyone knows abt Test Complete material, Pls let me Know. if u have any material or any documents..... Pls mail me on this mail Id...... This is very Urgent Requirment..... for my Project.....

3 Answers  


What are the advantages of vbscript?

0 Answers  


Categories