Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
No value is returned to function call line
#3
Solved: 11 Years, 5 Months ago
Here are 2 ways to fix the issue. I hope this helps.

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
Reply


Messages In This Thread
RE: No value is returned to function call line - by swat2008 - 09-20-2008, 02:09 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Fifth word from every thousand line in notepad files. sallu.iet@gmail.com 0 988 01-17-2020, 09:58 AM
Last Post: sallu.iet@gmail.com
  Grab multiple line data from log file haziqwebs 0 1,826 10-19-2016, 01:28 PM
Last Post: haziqwebs
  Calling a function in a Test Script from a function library anupam4j 3 6,193 06-26-2015, 12:31 AM
Last Post: babu123
  Not able to call the function kathirvelnagaraj 1 2,664 01-06-2015, 07:24 PM
Last Post: kathirvelnagaraj
  General run error. Line (18): "Loop while Browser("Index:=0").Object.Busy" AshokReddy 3 5,138 12-20-2013, 01:44 PM
Last Post: sshukla12

Forum Jump:


Users browsing this thread: 2 Guest(s)