Hi joshi, Here the mistake, you should remove the gap between *Report Event*.you get the error free.single space gap is there.remove and try it. the script should be like this Reporter.ReportEvent micPass, "No.of Links", "the user defined step passed." then you may not get the expected end of staement at the line 5.
Regards, Venkata baala. On Sat, Aug 29, 2009 at 5:58 AM, RRJoshi Joshi <[email protected]>wrote: > Hi Again, > > One mistake is that it should be : > If NumLinks=16 and not == 16. > I corrected this. > But it still says Expected End of Statement for line 5, i.e the ReportEvent > line. > Please help. > > Thanks, > Joshi > > On Fri, Aug 28, 2009 at 5:25 PM, RRJoshi Joshi <[email protected]>wrote: > >> Hi, >> I am trying a simple scenario where in I want to count the number of links >> on Google webpage. >> If the no.of links equals 16 then I want the Result as Pass in QTP Test >> Results, for this I am using ReportEvent. >> However, there is some mistake in my code. >> Could anyone please help resolve these? >> >> Browser("Google").Page("Page_Google").Sync >> Set LnkCounter=Browser("Google").Page("Page_Google").Object.links >> NumLinks=LnkCounter.length >> If NumLinks==16 Then >> Reporter.Report Event micPass, "No.of Links", "the user defined step >> passed." >> End If >> >> Thanks in advance! >> >> -RRJoshi >> > > > > > -- Venkata Bala --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
