09-26-2009, 07:09 AM
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
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):
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
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
Code:
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):
Code:
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