Try to do in this way, if am worng, plz do correct me
systemutil.Run "iexplore","www.google.co.in"
Call Check_Load("Maps")
Public Function Check_Load(Byval lnkName)

Browser("Google").Page("Google").Link("innertext:="&lnkName).Click
StartTime=MercuryTimers.Timer(Time1).Start
StopTime=MercuryTimers.Timer(Time1).Stop
'msgbox StopTime
EndTime=StopTime-StartTime
msgbox EndTime
Check_Load="Sucess"
'msgbox EndTime
End Function

2009/9/29 RRJoshi Joshi <[email protected]>

> Hi,
>
> I have written the following function to calculate the load time for a
> page.
> Objective: Google home page opens
> Click on Google Maps link
> Get StartTime
> Once Google Maps page arrives, get StopTime
> Difference between StopTime and StartTime is the time the page takes to
> load.
>
> Problem:
> Even after the last step, the arrow is again at Step 6.It doesnt stop at
> the last line,i.e at msgbox and doesnt provide me the result.
> Also, the result for msgbox StartTime is empty, no value
> and for SttopTime its 0..
>
> Code/Function is:
>
> Public Function CheckLoadTime(ByVal LnkName,ByVal BroName,ByVal PagTitle)
> Browser("Bro_Google").Page("Pag_Google").Sync
> Browser("Bro_Google").Page("Pag_Google").Link("name:="&LnkName).Click
> wait(2)
> StartTime=MercuryTimers.Timer("Timer1").Start
> msgbox StartTime
> Browser("name:=" & BroName).Page("title:=" & PagTitle).Sync
> StopTime=MercuryTimers.Timer("Timer2").Stop
> msgbox StopTime
> CheckLoadTime=StopTime-StartTime
> End Function
> Call CheckLoadTime("Maps","Google Maps","Google Maps")
> msgbox CheckLoadTime(LnkName,BroName,PagTitle)
>
>
> Please help.
> I appreciate it.
>
> -Joshi
>
> >
>


-- 
Thanks & Regards,
 Pradeep. K

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to