How to write a function for Maximising a Browser in QTP ?

Hi QTP Experts,

how to write a function for Maximising a Browser in QTP I'm already having function for that but it's taking very slow to access the browser im pasting my function below

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

And also I'm having different function but its for making the browser as full screen not maximising the Browser as if like if we press F12 for the Opened Browser but its not working for Maximising the Browser which I'm pasting it down


Maximize the Browser
''Name : fnBrowserMaximize()
''Description: This function is used to Maximize the Browser
''Arguments:
''Example:
''Return True/False
'Pre-Condition: Chordiant Application
'Post-Condition:Chordiant Application
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Public Function fnBrowserMaximize()
fnBrowserMaximize=false

wait(2)
If Browser("Creationtime:=0").exist(1) then
If Browser("Creationtime:=0").Object.Top <> "-1" then

Browser("Creationtime:=0").Page("Creationtime:=0").sync
Browser("Creationtime:=0").FullScreen
fnBrowserMaximize=true
End If
End If
End Function


Pls help me with this ?

Thanks in Advance,

Prabhu.R

Questions by PrabhuSparks   answers by PrabhuSparks

Showing Answers 1 - 3 of 3 Answers

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions