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 |
I want good books or good sites for scripting.Can any one help me.
How to learn VB Script, Since iam working with QTP. So i need to learn VB script.
What is variant in vb script?
I have an excel sheet with multiple ID's in a column. Now i need fetch those ID's in an application and check whether if it already exist in the DB. If not then i have to go with the process of inserting them in the DB. If it exists then i need to skip that ID and move to the next ID and check the same and proceed. How can i do that with for loop and if condition?
How to use QTP Object in .vbs(vbscript file) file Ex: Browser().., wait(), exist() and etc...
What is byref and byval parameters in vbscript?
In what way program "hello world" you can write in vbscript?
what is diff between static and dynaic arrys?
i want to when we will write the scripts either after getting the build or after getting the SRS?
Explain the scope of the variables using dim, public, and private keywords respectively.
What is the difference between vbscript and vba?
Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?