Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unique Browser identification
#2
Not Solved
Hi Tarun,

Check with the below codes, both are working fine as you expectedSmile
Note: I am using IE 6.

Code 1:
Code:
Dim IE
Set IE=createObject("internetExplorer.application")
IE.visible=true
hwndMain=IE.HWND
msgbox hwndMain
Window("hwnd:="& hwndMain).Maximize
IE.Navigate "about:blank"
urlToNavigate="www.gmail.com"
Browser("hwnd:="& hwndMain).Navigate urlToNavigate
Set IE=Nothing

Code 2:
Code:
Dim IE,IE1
Set IE=createObject("internetExplorer.application")
IE.visible=true
hwndMain=IE.HWND
msgbox hwndMain
Window("hwnd:="&hwndMain).Maximize
IE.Navigate "about:blank"
IE.Navigate "www.google.com"
Set IE1=createObject("internetExplorer.application")
IE1.visible=true
hwndMain1=IE1.HWND
msgbox hwndMain1
IE1.Navigate "www.gmail.com"
Set bDesc = Description.Create()
bDesc("application version").Value = "internet explorer 6"
Set bColl = DeskTop.ChildObjects(bDesc)
Cnt = bColl.Count
MsgBox "There are total: "&Cnt&"browsers opened"
For i = 0 To (Cnt -1)
  MsgBox "Browser : "&i+1&" has title: "& bColl(i).GetROProperty("title")
Next
Set bColl = Nothing
Set bDesc = Nothing
Set IE = Nothing
Set IE1 = Nothing

Hope this would solve your issuesSmile
Reply


Messages In This Thread
Unique Browser identification - by mca.tarun - 12-11-2009, 07:29 PM
RE: Unique Browser identification - by sreekanth chilam - 12-12-2009, 10:16 AM
RE: Unique Browser identification - by mca.tarun - 12-14-2009, 03:05 PM
RE: Unique Browser identification - by mca.tarun - 12-14-2009, 03:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to identify dynamic webtable as unique in QTP? sudheendramurthy 4 18,556 02-23-2016, 06:16 PM
Last Post: vinod123
  Cannot find the "[ WebEdit ]" object's parent "[ Browser ]" (class Browser). Verify t Divya Roopa 1 8,476 03-11-2014, 12:13 PM
Last Post: devarapallliramana
  Can I use html id as an unique identifier for all the components in a web page qtplearner88 8 8,505 05-21-2012, 06:52 PM
Last Post: falvi
  Unable to find a unique property Saranya 2 2,780 05-11-2008, 05:21 AM
Last Post: Anshoo Arora

Forum Jump:


Users browsing this thread: 1 Guest(s)