Return results in Robot Framework keyword?

前端 未结 5 1422
青春惊慌失措
青春惊慌失措 2021-02-05 08:34

How can I return the results after running a keyword?

Example:

mykey word [Arguments] input
   ${results}=  getme input

But I want to u

5条回答
  •  长情又很酷
    2021-02-05 09:17

    The easiest way is to use the suggested [Return] tag at the end of your keyword, though other ways exist.

    Using the keyword Set Global Variable, you can make a variable accessible outside of the keyword it's run in without having to return anything from the keyword itself. This is useful if you want to avoid cluttering up your main variable list and have a few variables sitting in the background, but use it with as much caution as you would any global variable.

提交回复
热议问题