Here are 2 ways to fix the issue. I hope this helps.
1.**************Here you are calling the function in the reporter statement
2. **********here you store the result of the function into a variable and then use the variable in the reporter statement
1.**************Here you are calling the function in the reporter statement
Code:
Reporter.ReportEvent micPass, "Test Function", "TestFunction: " & TestFunction( sMenuClick, noMenuVal )
Function TestFunction (sMenuClick, noMenuVal)
If 1+1 = 2 Then
TestFunction = true
Reporter.ReportEvent micPass, "INSIDE Test Function", "TestFunction: " & TestFunction
End If
End Function
2. **********here you store the result of the function into a variable and then use the variable in the reporter statement
Code:
TestResult = TestFunction (sMenuClick, noMenuVal)
Reporter.ReportEvent micPass, "Test Function", "TestFunction: " & TestResult
Function TestFunction (sMenuClick, noMenuVal)
If 1+1 = 2 Then
TestFunction = true
Reporter.ReportEvent micPass, "INSIDE Test Function", "TestFunction: " & TestFunction
End If
End Function