Results 1 to 8 of 8

Thread: Retrieveing the title of the currently active window

  1. #1
    Geek_Guest
    Guest

    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


  2. #2
    Expert Member
    Join Date
    Nov 2006
    Answers
    518

    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-

  3. #3
    Junior Member
    Join Date
    Mar 2007
    Answers
    2

    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?


  4. #4
    Junior Member
    Join Date
    Mar 2007
    Answers
    2

    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 .


  5. #5
    Expert Member
    Join Date
    Apr 2007
    Answers
    147

    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


  6. #6
    Junior Member
    Join Date
    Jun 2008
    Answers
    1

    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


  7. #7
    Expert Member
    Join Date
    Nov 2006
    Answers
    518

    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-

  8. #8
    Junior Member
    Join Date
    Jul 2009
    Answers
    1

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact