Forum Discussion

maurus_spescha's avatar
maurus_spescha
Occasional Contributor
11 years ago

Using the return value of a JScript function as a parameter in a keyword test.

I would like to use the return value of a JScript function as parameter in a keyword test.

How can I do this?



Many thanks for your answer.

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    I'm with Jose on this... Last Result might work... although, I'm not sure how you could use the specific result of a function if that function is not, explicitly, the previous step in your keyword test.



    Another solution would be, in your test item where you are calling your keyword test, have it point to a Project Variable and then have your JScript function populate that variable.



    Either way should work.
  • jose_pita's avatar
    jose_pita
    Super Contributor
    Yup Robert, that also works.



    I use the "LastResult" functionality a lot, I call the script routine and after that use it to either populate a keyword variable or do something with the returned value, usually an object.



    You're pretty busy today :)