pls find my comments in RED below...
On Tue, Sep 29, 2009 at 1:22 PM, Pradeep <[email protected]> wrote: > 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 > Write a sync function, which will validate for an object in the Google Maps page (which would be the last object, that will be loaded in the page), once that is loaded ....then get the StopTime... > 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 > > > > -- Mallipeddi Sreedhar 91-9000994721 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
