Forum Discussion

bdrummond's avatar
bdrummond
Contributor
7 years ago

Last Operation Result & Save to File is resulting in Blank

Hello all,   I am stuck on one bit of test complete's keyword test. Specifically, the Setting Variable value by using 'Last Operation Result' mode.    As you can see in the image, I have a Log me...
  • tristaanogre's avatar
    7 years ago

    The "Log.Message" operation doesn't return any value.  So, "Last Operation Result" is null or blank or empty.  That's why your variable isn't getting set to anything.  You should set the variable value before your first log message, log your message with the variable (no code snippet needed as you can pass the variable in to the text parameter on Message), and then use the variable to write to your text file.  I wouldn't use "Last Operation Result" at all.  That's used more on the lines of if you have some function or method or something that returns a value then use that value in some fashion in the next test step.  since Log.Message doesn't return a value, "Last Operation Result" doesn't make sense.