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.

Retrieveing the title of the currently active window

This is a discussion on Retrieveing the title of the currently active window within the QTP forums, part of the Software Testing category; Question asked by visitor aditya Could some body help in retrieveing the title of the currently active window? Suppose three windows are opened and one of them is currently activated(having ...

Go Back   Geeks Talk > Software Testing > QTP
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 03-26-2007
Expert Member
 
Join Date: Feb 2007
Posts: 1,279
Thanks: 0
Thanked 191 Times in 153 Posts
Geek_Guest has a spectacular aura aboutGeek_Guest has a spectacular aura aboutGeek_Guest has a spectacular aura about
Retrieveing the title of the currently active window

Question asked by visitor aditya

Could some body help in retrieveing the title of the currently active window?

Suppose three windows are opened and one of them is currently activated(having focus)

We don't know which window is in activated...so I need a mechanism that finds the currently activated window and retrieves the title of it.

Please help me as I am in reat need of it
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-26-2007
Expert Member
 
Join Date: Nov 2006
Location: Hyd-IND
Posts: 528
Thanks: 1
Thanked 63 Times in 50 Posts
sutnarcha is on a distinguished road
Re: Retrieveing the title of the currently active window

I think it is not posible to get the title of an active window coz the title of the window is used (sent as arguement) to work on the window or its components.

I am working on it and it may be posible using visual script discriptive programming in QTP.
__________________
Lack of WILL POWER has caused more failure than
lack of INTELLIGENCE or ABILITY.

-sutnarcha-
Reply With Quote
  #3 (permalink)  
Old 03-30-2007
Junior Member
 
Join Date: Mar 2007
Location: mumbai
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
kiran_cap2006 is on a distinguished road
Re: Retrieveing the title of the currently active window

hi,
me to working on the same .
if its possible . then it will be gr8 help for me. it decreases my code complexity.
plz forward me any message regarding this?
Reply With Quote
  #4 (permalink)  
Old 03-30-2007
Junior Member
 
Join Date: Mar 2007
Location: mumbai
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
kiran_cap2006 is on a distinguished road
Re: Retrieveing the title of the currently active window

hi,
me to working on the same .
if its possible to know the window's logical name . then it will be a gr8 help for me. it decreases my code complexity .
if u have any new ideas, plz share .
Reply With Quote
  #5 (permalink)  
Old 04-30-2007
Expert Member
 
Join Date: Apr 2007
Location: Kolkata
Posts: 151
Thanks: 3
Thanked 11 Times in 10 Posts
debleena23 is on a distinguished road
Re: Retrieveing the title of the currently active window

Its true getting the title for the currently open Browser is easy. But never tried with Windows application. Help will be appreciated.
Thanks in advance
Reply With Quote
  #6 (permalink)  
Old 06-27-2008
Junior Member
 
Join Date: Jun 2008
Location: USA
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
anilkumarbj is on a distinguished road
Re: Retrieveing the title of the currently active window

Yes, we can get the active window name:

Var = Window("ForeGround:=True").GetROProperty("Title")
Msgbox Var
Reply With Quote
  #7 (permalink)  
Old 06-28-2008
Expert Member
 
Join Date: Nov 2006
Location: Hyd-IND
Posts: 528
Thanks: 1
Thanked 63 Times in 50 Posts
sutnarcha is on a distinguished road
Re: Retrieveing the title of the currently active window

This is good work from anilkumarbj

One point I noticed is that, this code cannot be debugged. If debugged, it will always give the title of the QTP application window.

Also, before we place these statements in our code, we should have other QTP statements that activate the required application window or any of its sub windows or dialog boxes.
__________________
Lack of WILL POWER has caused more failure than
lack of INTELLIGENCE or ABILITY.

-sutnarcha-
Reply With Quote
  #8 (permalink)  
Old 07-06-2009
Junior Member
 
Join Date: Jul 2009
Location: Israel
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
ronis is on a distinguished road
Re: Retrieveing the title of the currently active window

anilkumarbj

Thanks a lot. you saved me a lot of time and effort with your 2 code lines. it even works for my lousy powerbuilder.
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
Blank Active Screen in QTP 9 Lokesh M QTP 8 09-18-2007 07:38 AM
flash popup window..? psuresh1982 Scripting 1 07-20-2007 01:42 PM
Active Screen In QTP padsha QTP 4 04-30-2007 02:10 PM
Query with window XP fred Unix/Linux 1 04-03-2007 11:28 PM
More than one name for a window in an application SowmyaManjunath WinRunner 1 03-24-2007 07:29 AM


All times are GMT -4. The time now is 06:15 PM.


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