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


Please Help Members By Posting Answers For Below Questions

i need to sort the data using qtp script for this how i need to write a qtp script

3210


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("<>") I have taken a for loop and changed the cells values (1 as i and another 1 as j) But still I am not able to get Plz kindly tell me know this . It is very urgent

1760


How will you get the octal value of the given number in vbscript?

493


Could Anybody Please tell me What is the script for Find 3rd Largest element in the Array without using a SORT function int Find(int arr[], int size); Thanks in Advance..

2014


how to increase the values in text box in a given text box increament by two values by clicking on button

1641






what is diff between static and dynaic arrys?

1579


How to pass argument by reference to a function in vbscript?

527


Which operator can be used to change the value of the operand or change the state of the condition?

567


How to open a file. What is the perpose of true and false mode there?

595


Explain the tristate constants in vbscript?

550


What is vbscript procedures?

592


How to capture a runtime error in vbscript?

622


Plzzzzzzz can any one tell me which is the best institute in hyderabad for learing VBScript. plz do answer guys its urgent plzzzzzzz. thanks in advance.

1716


Description.Create

2155


How can you destroy an object in vbscript?

634