Ask a Question

Last Operation Result returns blank

Occasional Contributor

Last Operation Result returns blank

I have a master VBA script that loops through a spreadsheet header row to get the name of the keyword script that I want to run next, then feeds that name from the header as a variable to run that script.  I am now trying to get the result of that keyword test, pass, warning or fail, and write that back to the spreadsheet in the row below the header.  I know how to write back to the spreadsheet but what I have a problem with is getting a value for the result, it is always returning blank so it always goes to the else even though the keyword test passed.


I have tried the following that I found in other topics, but always blank.  Is there something I am missing?


LastResult = Eval("KeywordTests." + testCaseName + ".Run")

If (LastResult = True) Then

Call Log.Message("Pass", "")


Call Log.Message("Fail", "")

End If




If Eval("KeywordTests." + testCaseName + ".Run") Then

Log.Message "Test returned True"


Log.Message "Test returned False"

End If


I have also tried this through just a simple keyword test, but still returns blank. 





Regular Contributor

I have a feeling after reading this that you might have to do that.


It says, 'The Return operation sets the result value of the keyword test and then exits the test.'

Frequent Contributor

Carrying djadhav's response one step further, This link states the following:


"To return a value from a keyword test, you can use the Return operation. You typically add this operation at the end of the test, because it immediately exits the test. Tests without the Return operation have no return value."


Since there is no return value from the called test without setting the Return operation, the last operation result is blank and is logged as such.

Occasional Contributor

Ok thanks.  I will give this a try if I can't find a way to not have to update the scripts being called.

Showing results for 
Search instead for 
Did you mean: