Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
No. of Browsers
#1
Not Solved Question 
Hello Friends,

My question is we have no.of browsers opened in our windows, now I need how many browsers opened and what are their names...! and how to close particular browser?

thanx in advance
Reply
#2
Not Solved
You can use the Description.Create & ChildObjects. For example:

Code:
Set brow = Description.Create()
brow("application version").value="internet explorer 6"
Set browobj = desktop.ChildObjects(brow)
NoOfChildObjs = browobj.Count

msgbox NoOfChildObjs

For Counter=0 to NoOfChildObjs-1
    msgbox browobj(counter).getroproperty("name")
Next

browobj(0).close

that is you build an array [ -> browobj ] in which each element is a browser (and with Description.Create you can better specify the properties)
Reply
#3
Not Solved
stevol Wrote:You can use the Description.Create & ChildObjects. For example:

Code:
Set brow = Description.Create()
brow("application version").value="internet explorer 6"
Set browobj = desktop.ChildObjects(brow)
NoOfChildObjs = browobj.Count

msgbox NoOfChildObjs

For Counter=0 to NoOfChildObjs-1
    msgbox browobj(counter).getroproperty("name")
Next

browobj(0).close

that is you build an array [ -> browobj ] in which each element is a browser (and with Description.Create you can better specify the properties)

Thanks Stevol,

I will get that no. of browsers opened and their names by using description.create,

Can I close particular browser without using description.create,
Reply
#4
Not Solved
If you know the properties of this browser, you can identify it (and close it). For example with hwnd property:

Code:
Dim brclose
Set brclose = Browser ("hwnd:=xyz")
brclose.close
Reply
#5
Not Solved
Hi ,

We can close the required browser in the below ways, if at all we know any property(say hwnd=xyz) :

1st way :
Browser ("hwnd:=xyz").close

2nd Way:
systemutil.CloseProcessByHwnd("xyz")
Reply
#6
Not Solved
Thank You Sreekanth,

I expected 2nd way....!

but, can't we use Systemutil.closeprocessbyname/title("xyz")
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Running test with multiple browsers mvi63 0 2,817 06-25-2014, 06:49 PM
Last Post: mvi63
  Multiple 2 IE browsers are being displayed VA1405 1 1,908 01-15-2014, 07:20 AM
Last Post: basanth27
  Will Object Property Differ across browsers?? qtplearner88 7 4,153 07-30-2013, 07:18 PM
Last Post: qtplearner88
  Can I use the index ordinal identifier for different browsers and page? Uma 2 3,629 08-25-2011, 03:33 AM
Last Post: Uma
  How to automate detection of type and version of browsers mikek12f 0 1,748 06-07-2009, 07:52 PM
Last Post: mikek12f

Forum Jump:


Users browsing this thread: 1 Guest(s)