-
Expert Member
Working with IE Object
Hi Geeks,
I am working with IE Object Model. I wish to trap the Caption / title of the Newly opened window. I am using the below code in a .vbs file.I am not able to find a property or method that pertains to Window Caption or working with Window Objects.
The code is somewhat like -
dim objIE
set objIE = CreateObject("InternetExplorer.Application")
objIE.visible = true
objIE.StatusBar = 1
objIE.Navigate "http://www.google.com"
while objIE.ReadyState = true
msgbox objIE.getProperty(Caption)
wend
The code returns an empty message box. I want to capture the Window title or Caption. Any Ideas anybody..... Thanks in Advance.
Cheers....
-
Moderator
Re: Working with IE Object
bizzzare, try this:
Public Function appBrowser()
set descBrowser = description.create()
descBrowser("micclass").value="Browser"
If Desktop.ChildObjects(descBrowser).count>1 Then
descBrowser("Creationtime").value = 0
End If
Set appBrowser = descBrowser
Set descBrowser = nothing
End Function
brProperty=Browser(appbrowser).GetROProperty ("title")
Print brProperty
Last edited by Anshoo_Arora; 01-08-2008 at 04:26 PM.
-
Expert Member
Re: Working with IE Object
Hi Anshoo,
Thanks for the answer mate...
But unfortunately I am trying to work with the .vbs part only. This is as part of a Modular framework I am trying to develop for Automated applications.
So I like wanted a method / property pertaining to IE Object only. It cannot be QTP Specific.
Anyways, thanks again for the reply..
Cheers...
-
Moderator
Re: Working with IE Object
Dim objIE
Set objIE = GetObject("InternetExplorer.Application")
Msgbox objIE.Parent
Strangely, this works. It displays the name of the Browser, but not the title. Title, caption, status etc. don't seem to work. I am going to try some more tomorrow morning.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules