Forum Discussion
I don't see it in your example. Can you post the script that returns the value? e.g. body of globallogin script
Maybe I don't understand exactly what both of you are asking, or I wasn't clear above but hopefully I can answer.
djadhav - In the testSuiteRun Sub code above, I included basically the code that is in the "Using the Return Operation" section in the link you included in your post. It is represented in this code:
If Eval("KeywordTests." + testCaseName + ".Run") Then
sheet.Cells(r, c) = "P"
Else
sheet.Cells(r, c) = "F"
End If
After it plays the script on the If Eval("KeywordTests." + testCaseName + ".Run") Then line, it jumps to the Else step.
I don't know if that is what you mean by "Did you include the Return Option.." or not, or is there something else I need to do? If so where would it fit into the testSuiteRun sub script above?
joseph_michaud and djadhav - Above is also the script, Test_Run_JG(), that I did in fact try to log the return value, and it returns nothing, it is blank, no True or False, nothing.
Here are screenshots again of just a keyword script that I had also tried before posting with calling another keyword script, then logging Last Operation Results. Again, nothing.
- djadhav9 years agoRegular Contributor
I apologize if I was not very clear. That code would not go in the testSuiteRun.
Here is an example of what I am asking:
Your code Eval("KeywordTests." + testCaseName + ".Run") calls a piece of code referred to by the 'testCaseName'. That piece of code should have a return statement in the end.
e.g. Let's say testCaseName is Login from the Excel file. So you will call Eval("KeywordTests.Login.Run"). I need to see Login module that is being executed here because that is where the return statement would go.
Hope this helps
- jgoetz9 years agoOccasional Contributor
Ok i don't see that mentioned in what I have read. The script being called is a keyword test script, not a VBA script, it is looks like this.
From what I read here, https://support.smartbear.com/viewarticle/74736/ the Last Operation Result should carry over to the script/keyword that it is called from without adding anything to the keyword that is called. Or maybe I miss it.
I would prefer not to have update all of the 50 some keyword tests that we already have being called if that is possible.
- djadhav9 years agoRegular Contributor
I have a feeling after reading this https://support.smartbear.com/viewarticle/67975/ 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.'