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

Can anyone send me a vb script function for verifying the functionality of active links on a web page

1596


Which command is used for writing text on a page?

574


What are keywords in the vbscript language?

521


How to write functions and sub in vb script?

620


What is sql loader? Explain the files used by sql loader to load file?

620






How many types of procedures are available in the vbscript language?

532


Can automation testing find ssame no. of bugs what we can find by manual testing?

1464


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

2580


Explain about tristate constants?

583


How to open browser in vb script?

582


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.

2552


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

1749


What is the technology used by vb script?

539


Explain about the functionality of vb script?

567


When does ‘on click of button’ event gets triggered in the vbscript language?

543