Ask a Question

Script-functions from KeywordTests

rowisoft
Not applicable

Script-functions from KeywordTests

Hi,



is it possible to call a script-function from a keyword-test? In my keyword-test I am filling a edit-box by the "Keys"-operation with the value "test". Now I want to change the value "test" to a random string-value.



Therefore I have created a function "RandomString" in my Script, which returns a random generated string. Then I tried to write "RandomString()" in the "Operation Parameters" of my keyword-test, but this seems not to work.



Is it possible to call some script-functions from my keyword-test?



What is the best way to use random generated strings to be typed in in my edit-fields? I do not want to use variables which I have to fill by script at the begin of the test-run, because I need a lot of random-strings and do not want that many variables...



Regards,

Robert
1 REPLY 1

Hi Robert,


To call a script function from a keyword test, use the "Run Script Routine" operation. See the "Run Script Routine Operation" article for details. The function can return a new generated string whose value you can get using 'Last Operation Result'. More information can be found in the "Checking Operation Result" article.


Best regards,
Alexey

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: