Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Working with IE Object

This is a discussion on Working with IE Object within the QTP forums, part of the Software Testing category; 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 ...

Go Back   Geeks Talk > Software Testing > QTP
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 01-08-2008
Expert Member
 
Join Date: Oct 2007
Location: Mumbai
Posts: 355
Thanks: 4
Thanked 58 Times in 47 Posts
bizzzzzare will become famous soon enough
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....
__________________
Regards,

V.Umesh Krishnan
QA Consultant
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-08-2008
Moderator
 
Join Date: Oct 2007
Location: Frankfort, KY
Posts: 283
Thanks: 3
Thanked 54 Times in 36 Posts
Anshoo_Arora is on a distinguished road
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.
Reply With Quote
The Following User Says Thank You to Anshoo_Arora For This Useful Post:
  #3 (permalink)  
Old 01-09-2008
Expert Member
 
Join Date: Oct 2007
Location: Mumbai
Posts: 355
Thanks: 4
Thanked 58 Times in 47 Posts
bizzzzzare will become famous soon enough
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...
__________________
Regards,

V.Umesh Krishnan
QA Consultant
Reply With Quote
  #4 (permalink)  
Old 01-09-2008
Moderator
 
Join Date: Oct 2007
Location: Frankfort, KY
Posts: 283
Thanks: 3
Thanked 54 Times in 36 Posts
Anshoo_Arora is on a distinguished road
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.
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Difference between the object based and object oriented glatha C# 25 08-18-2009 08:36 AM
I cannot add a object as winmenu to object repository carina QTP 2 12-05-2007 06:01 AM
WinRunner not identified object , what 2 do other than virtual object wizard method. jayant_gajbhiye WinRunner 6 10-16-2007 07:23 AM
Subtract dimenstion object from measure object jgd.ramesh Data Warehousing 0 09-29-2007 02:11 AM
Reference to an object in object repository Geek_Guest QTP 0 09-24-2007 07:45 PM


All times are GMT -4. The time now is 06:05 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved