How can I return the results after running a keyword?
Example:
mykey word [Arguments] input
${results}= getme input
But I want to u
The Robot Framework user's guide describes how to return a value from a keyword. See User keyword return values.
The short version is: set a variable in your keyword, and use the [return]
testcase setting to return that variable.
Here's an example:
*** Keywords ***
mykey word
[Arguments] ${input}
${string}= set variable the string is "${input}"
[return] ${string}
*** Test Cases ***
Call custom keyword and get result
${results}= mykey word newinput
Should be equal ${results} the string is "newinput"
Robot also provides several keywords to explicitly return a value from anywhere in a keyword: