Hi,

I have written the following function to calculate the loading time.
Objective: Open Google Page
Click on any link (say, Maps)
Calculate time required for the Google Maps page to load

Public Function CheckLoadTime(ByVal LnkName,ByVal BroName,ByVal PagName)
'Dim LnkName
'Dim BroName
'Dim PagName
Browser("Bro_Google").Page("Pag_Google").Sync
Browser("Bro_Google").Page("Pag_Google").Link(LnkName).Click
StartTime=MercuryTimers.Timer("Timer1").Start
Browser(BroName).Page(PagName).Sync
StopTime=MercuryTimers.Timer("Timer2").Stop
CheckLoadTime=StopTime-StartTime
End Function

Call CheckLoadTime("Lnk_Maps","Bro_GoogleMaps","Pag_GoogleMaps")
msgbox CheckLoadTime(LnkName,BroName,PagName)

Now, when I run the test, GoogleMaps opens, but I get a error as
"Failed to run test due to uknown error" and it points to
Line(6):Browser("Bro_Google").Page("Pag_Google").Link(LnkName).Click
Can someone please tell me where I am going wrong?I know,perhaps my basics
are not in place, but I am learning.

Thanks,
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to