Micro Focus QTP (UFT) Forums
maximize window function - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: maximize window function (/Thread-maximize-window-function)



maximize window function - newqtp - 04-10-2008

I've writen a function to maximize browser but i want to make it public so that it can be use for different browser just passing the browser.
but i'm not able to do. here is my code
Code:
Function MaxBrowser()
MaxBrowser = False
If Browser("Gmail: Email from Google").exist(1) Then
   Browser("Gmail: Email from Google").page("Gmail: Email from Google").sync
   Browser("Gmail: Email from Google").fullscreen
endif
endfunction
when i call this function work for only my gmail..I want to make universal like can be used for yahoo,graffiti or different browser by passing browser("Gmail: Email from Google") .How can i pass Gmail: Email from Google as argument?

Thanks.


RE: maximize window function - FredMan - 04-12-2008

Try this

Code:
Function MaxBrowser()
MaxBrowser = False
If Browser("CreationTime:=0").exist(1) Then
Browser("CreationTime:=0").page("micClass:=Page").sync
Browser("CreationTime:=0").fullscreen
endif
endfunction