Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
maximize window function
#1
Solved: 10 Years, 9 Months, 1 Week ago Question 
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.
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Maximize and Close a Browser mv8167 4 16,032 03-26-2023, 03:55 PM
Last Post: Mike B
  Calling a function in a Test Script from a function library anupam4j 3 5,905 06-26-2015, 12:31 AM
Last Post: babu123
  Is it possible to call Java window and Power Builder Window in 1 Action sbkhbk 0 2,449 06-05-2014, 08:18 PM
Last Post: sbkhbk
  qtp 11 not recording window within a window kp_usa 0 2,279 12-19-2012, 10:52 PM
Last Post: kp_usa
  QTP Opens a popup window but won't recognize the buttons in the window Blaster0007 4 7,644 07-20-2012, 12:03 AM
Last Post: sree.85

Forum Jump:


Users browsing this thread: 1 Guest(s)