11-28-2009, 05:04 PM
Dear All,
I am trying the below piece of code at home. The reporter.report event returns "Fail" for the below code.
Please look in to the code and advise me where it went wrong.
Thanks in advance,
Kishore
I am trying the below piece of code at home. The reporter.report event returns "Fail" for the below code.
Please look in to the code and advise me where it went wrong.
Code:
Set IE1=CreateObject("InternetExplorer.Application")
IE1.visible = True
IE1.navigate "www.google.com"
bpname"google","google" '' Calling the function bpname
If cons1 > 0 Then
reporter.ReportEvent micPass, "Passed","Links found"
else
reporter.ReportEvent micFail, "Failed","Links NOT found"
End If
'Closing the browser'
While Browser("CreationTime:=0").Exist
Browser("CreationTime:=0").Close
Wend
'Closing the browser ends'
''Start of the function bpname
Function bpname(bname, pname)
Set obj=description.Create
obj("html tag").Value ="A"
set var = browser("name:=" &bname).page("title:="&pname).ChildObjects(obj)
cons1=var.count
msgbox cons1
End Function
''end of the function bpname''
Thanks in advance,
Kishore