Quality Testing

Quality is delighting customers

How to Write a function in VBsrcipt to close all browser except the desired one.?

Write a Fucntion to close all Opened browser expect desired one?

Views: 201

Reply to This

Replies to This Discussion

set obj = description.create

obj("micclass").value = "Browser"

set browserobj = desktop.childobjects(obj)

for i=1 to browserobj.count

browserobj(i).close

next

Few corrections:

 

Index always starts from zero not one.

for i-0 to browserobj.count - 1

 

If you dont want close desired one then add if condition inside for loop (use Title property)

 

Subbu.

subbu thanks bro

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2022   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service