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

What are the naming conventions while declaring a variable in the vbscript language?

0 Answers  


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

0 Answers   Quest,


How strcomp function works?

0 Answers  


Hi this is Vinoth. I need a help on below mentioned question A combobox contains list of items assume as 5 I have to get each items Individually and I have to Export to datatable. Please help me on this. Thanks

0 Answers  


Which is the default Data types in VBScript?

7 Answers   AppLabs,






How do i automate a website www.flyashx.com without having any test cases witin a week time.

0 Answers   Zensar,


Illustrate briefly about the different types of statement

0 Answers  


To get data from table which method will be used in QTP

3 Answers  


Explain what is loose binding? Why is it not a good practice to use it?

0 Answers  


i am having some basic knowledge in c and VB 6.0. i qtp i want to know how to write the codings. by recording it is generating lot of codings. for example i want to test the text box. senerio is text box should not accept alphabets if it accept alphabets we should return fail status if it get number we should return pass status. how to write coding in vb script please help me

0 Answers  


write a vbscript for traffic signal

1 Answers  


Explain the filter expression?

0 Answers  


Categories