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
How to make sure that items in a wintree are sorted al?
What is the difference between vb debugger and the script debugger?
how to comvert 120 into one hunderd twenty rupees only and vice varsa
PLz send me the VB scripts which is having more examples my email id : hareen_11@yahoo.com
Explain about operator precedence in vb script?
Hello Friends , I am the new joinner of this website. I am working with Sapient ,Gurgoan I would like to ask few qurries regarding the QTP Tool of (Testing) Currently working on QTP Tool . I would like to no learn VB Script can u name some Books which i get in market. And a small issue in QTP I had 2 users right i have to login and send the document from this user to second user right. when i am send this doc some contendId number generates right. now i am loging into second user and i have to search for that contentId right i found it now i dont want to accept the document so i had an opption of check out ok i have to click on check out my QTP Code is like this Browser(" ").Page(" ").WebTable(" ").ChildItem (3,5,"Image",0).click Browser(" ").Page(" ").Link("ChecK Out").Click i new this code is perfectly right but when i am run the script i have to click on that particular contentId and click on check out but now the Problem is started the error is the document has been already checked out remeber every time my content id changes means it is the new contentId which is not been used atleast once Please help me out in this issue i am in big trouble
I am working on QTP, got struck in one place.. In my application depending upon configuration WebEdit count is increasing/ decreasing.. how to get these webedits..
What are class properties?
What are string functions in vbscript?
Illustrate briefly about the different types of statement
Mention what is select case statement?
Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?
Can anyone send me a vb script function for verifying the functionality of active links on a web page
Explain the .wsf files?
How to assign a numeric value to a variable?