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 |
How can you destroy an object in vbscript?
What are the environments supported by vbscript language?
how to declare a variable in vbscript using vbscript
Which object provide information about a single runtime error in a vbscript?
Consider there are objects in a webapp which are identified by QTP. Suppose you know only the logical name of a object(absolutely nothing else about it). Which approach will you take to find the "micClass" of the object(You can't use Object Spy, or can't add the object in repository)?
i need to login to my yahoo accoutnt using VB Script, automating the operation of webobjects, even launching of IE. How?
To get data from table which method will be used in QTP
If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?
What are the uses of vb script?
reverse the string without using reverse string?
a function that takes an integer array as an argument and returns the largest value in the array. Use the function in a program
this q asked in applabs, q is: QTP should open google.com page and enter "qtp" in one edit(search) box and click search and should open google.com again and enter "job" in edit(search) box and click on search. I tried this but getting error "Edit(search) box matches more than one object", could anyone this question plz..