Action1: No.ofLinks
Dim LnkName: LnkName = "Lnk_Maps"
Browser("Google").Page("Page_Google").Sync
RunAction "CalcLoadingTime", oneIteration
msgbox *LoadingTime*(LnkName)
Action2:CalcLoadingTime
Function *LoadingTime*(LnkName)
Browser("Google").Page("Page_Google").Link(LnkName).Click
StartTime=MercuryTimers.Timer("Timer1").Start
Browser(LnkName).Page().Link()
EndTime=MercuryTimers.Timer("Timer2").Stop
*LoadingTime*=EndTime-StartTime
End Function
On Sun, Aug 30, 2009 at 10:40 AM, RRJoshi Joshi <[email protected]>wrote:
> Thanks so much Ludmila and Venkat.
> Can you/someone help me with the following please?
>
> I have written a function for calculating the downloading time when clicked
> on various links on Google webpage.
> Like, if I click on Google Maps, how long does it take for the Google Maps
> page to download.
> I am getting a "mismatch type" error.
>
> In a test:
> Action1: No.ofLinks
> Dim LnkName
> Browser("Google").Page("Page_Google").Sync
> RunAction "CalcLoadingTime", oneIteration
> LoadingTime("Lnk_Maps")
> msgbox TotalTime
>
> Action2:CalcLoadingTime
> Function LoadingTime(LnkName)
> Browser("Google").Page("Page_Google").Link(LnkName).Click
> StartTime=MercuryTimers.Timer("Timer1").Start
> Browser(LnkName).Page().Link()
> EndTime=MercuryTimers.Timer("Timer2").Stop
> TotalTime=EndTime-StartTime
> End Function
>
> So, I am calling CalcLoadingTime action from No.ofLinks action.
> When I run this test, I get a "type mismatch" error for the step
> LoadingTime("Lnk_Maps")
>
> Can someone tell me where I am going wrong.?
>
> Thanks a lot.
>
> -Joshi
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---