Forum Discussion

Ryan_Moran's avatar
Ryan_Moran
Valued Contributor
5 years ago

importing function from javascript to keyword test

Attempting to use  require("MyCommonUnit").myFunction("someparameter") within a keyword test statement such as Set Variable Value  Seems like this should work, but returns an error: Unable ...
  • tristaanogre's avatar
    tristaanogre
    5 years ago

    You can... if the function returns something, you can still use the Set Variable value after the script function call and set the "mode" of the set variable to "Last Operation Result".  This will take whatever the result is of the function call and assign it to the variable value.