cancel
Showing results for 
Search instead for 
Did you mean: 

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

maurus_spescha
Occasional Contributor

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 3
jose_pita
Super Contributor

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

tristaanogre
Community Hero

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

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.

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
jose_pita
Super Contributor

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

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 🙂
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors