Forum Discussion

Charlie_Burris's avatar
Charlie_Burris
Senior Member
9 years ago
Solved

How to assign a variable in a keyword test to the result of a script function?

Currently if I want to set a variable value in my keyword tests it takes two statements:

Run Script Unit (myFunction)

Set Variable Value (Last Operation Result)

 

My question, is there a way to do this in one operation such as Set Variable Value (myFunction)

  • If you use Run Code Snippet you should be able to do something like 

     

    set MyVariable = myFunction

  • baxatob's avatar
    baxatob
    9 years ago

    Also you can set the variable inside your function.

2 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    If you use Run Code Snippet you should be able to do something like 

     

    set MyVariable = myFunction

    • baxatob's avatar
      baxatob
      Community Hero

      Also you can set the variable inside your function.