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
Can anyone send me a vb script function for verifying the functionality of active links on a web page
Which command is used for writing text on a page?
What are keywords in the vbscript language?
How to write functions and sub in vb script?
What is sql loader? Explain the files used by sql loader to load file?
How many types of procedures are available in the vbscript language?
Can automation testing find ssame no. of bugs what we can find by manual testing?
hi i am trying for testing job for 3+ experience(fake) can u suggest me what type of projects i can keep in my resume and how much of knoeledge i should have abt that project.thnks in advance.urgt plz
Explain about tristate constants?
How to open browser in vb script?
Hi Friends, I have an issue like the describe below: I'm using QTP and I'm testing on SharePoint. As you knoe, SharePoint has a customize function for user, so that, If I add an object Web Table at the first time, that object was recognized by "index" and "html tag", after that, if someone change the display of web part, the "Index" of my object was changed as well and QTP unable to select that Web Table. Can you guide me how to identify or anyway to keep that Web Table object as unique object? Thanks a lot.
For a webbased application:- what should be code in expert veiw, for retrieving a single column name "username" from a server and checking whether exported "username" from datatable doesn't exist in server. suppose i have saved in excelsheet a username="gayatri" , which is exported, then checked for whether this username "gayatri" exist in server database or not ? if exist then allow to enter new username, which should be again checked for in loop , or else come out of loop and enter a distinct "username". plz let me have this answer in my id gayatrisahooin@hotmail.com
What is the technology used by vb script?
Explain about the functionality of vb script?
When does ‘on click of button’ event gets triggered in the vbscript language?