I created a fairly simple function, but I must have overlooked something because I get 3 errors on saving:
- Expected ')'
- Expected end of statement
- Expected End Sub or End Function or End Property
Here is the code:
Function ReportCheck(sParent, sReport, sTitle)
oParentWindow = "My_Reports," & sParent
BuildAndRunObject "My_Reports" , sReport,"LINK", "CLICK","","", "ABORT","","","",""
BuildAndRunObject oParentWindow ,sTitle,"WEBELEMENT", "EXIST","","", "","","","",""
'BuildAndRunObject oParentWindow ,"select","WEBELEMENT", "SELECT","2009 - 2013","SELECT_VALUE", "ABORT","","","",""
BuildAndRunObject oParentWindow ,"Create","WEBBUTTON", "CLICK","","", "ABORT","","","",""
Wait(20)
If BuildAndReportObject(oParentWindow, "Checkmark", "WEBELEMENT","VERIFY PROPERTY VALUE".TRUE. "VISIBLE","","","","","") and BuildAndReportObject(oParentWindow, "Report_Ready", "WEBELEMENT","VERIFY PROPERTY VALUE". TRUE. "VISIBLE","","","","","") Then
Reporter.ReportEvent micPass, "Credit Summary", "Report Generated Successfully"
Else
Reporter.ReportEvent micFail, sTitle, "Report Failed to Generate"
End if
End Function
The first error is for the IF line. The second error is for the Else. And the last is for the End If line.
What did I miss? I appreciate the second look. I am the only one at my company that uses VB Script so I don't have anyone to take a look...
Thanks,
Jamie