Results 1 to 6 of 6

Thread: How to Maximize/Minimize the Browser using QTP?

  1. #1
    Junior Member
    Join Date
    Dec 2007
    Answers
    1

    How to Maximize/Minimize the Browser using QTP?

    Hi,

    While executing the QTP script, browser is not opening in Maximize mode.
    Please suggest.

    Thanks,
    Vishwas


  2. #2
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    Re: How to Maximize/Minimize the Browser using QTP?

    Hi,

    Try using the handle property of the Browser Window -

    hWnd = Browser("browser_name").GetROProperty("hwnd")
    Window("hwnd:=" & hWnd).Maximize


    The same can be used for Minimize as well. Just select the Browser window you wish to trap the handle property for.

    Incase you are trying to use Descriptive Programming with the browser window in question, try the below code -

    sTitleMask = "Name of Window - *"
    Window("regexpwndtitle:=" & sTitleMask).Minimize


    Do post back incase of any difficulties.

    Cheers........


  3. #3
    Junior Member
    Join Date
    Apr 2009
    Answers
    1

    Re: How to Maximize/Minimize the Browser using QTP?

    Hi Umesh,

    Tnx for the reply. But it is not working for me. Is there any other solution??


  4. #4
    Expert Member
    Join Date
    Apr 2008
    Answers
    1,859

    Re: How to Maximize/Minimize the Browser using QTP?

    hello friend,

    Instead of using hwnd use title

    title= Browser("micClass:=Browser").GetROProperty("title")
    Window("title:=" & title).Maximize

    Thanks
    Deepa

    Last edited by deepasree; 05-21-2009 at 01:54 AM.

  5. #5
    Junior Member
    Join Date
    Oct 2009
    Answers
    1

    Re: How to Maximize/Minimize the Browser using QTP?

    I tried both of the possibilities.. but it gives an error "the operation cannot be performed".
    Does anybody know what I'm doing wrong?
    Thanx


  6. #6
    Expert Member
    Join Date
    Apr 2008
    Answers
    1,859

    Re: How to Maximize/Minimize the Browser using QTP?

    Quote Originally Posted by Hilveuh View Post
    I tried both of the possibilities.. but it gives an error "the operation cannot be performed".
    Does anybody know what I'm doing wrong?
    Thanx
    Hai friend,

    Please paste your code here, so that we can able to find out what went wrong.

    Thanks,
    Deepa

    Arise Awake And Stop Not Till The Goal Is Reached

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