Forum Discussion

dale_waterworth's avatar
dale_waterworth
Occasional Contributor
11 years ago

Calling function as keyword test parameter

How do you call a script function as a keyword test paramter? Let say i have a keyword test that call a script routine : function theTest(ref, magicNumber) {  ... } ...
  • TanyaYatskovska's avatar
    11 years ago

    Hi Dezza,


     


    You'll need to call the Run Code Snippet operation and specify there the following:




    Runner.CallMethod("Unit1.theTest", Runner.CallMethod("Unit1.generateRef"), Runner.CallMethod("Unit1.generateMagicNumber"))




    *Unit1 is the name of the unit with your script files.


     


    Not a very elegant way, but it should work, though.