cancel
Showing results for 
Search instead for 
Did you mean: 

Script-functions from KeywordTests

Highlighted
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
Highlighted

RE: Script-functions from KeywordTests

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. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Let's start July with new challenges!

Create a script to pass custom command-line arguments as a test parameter for the TechCorner tag!

Will you dare to take the challenge?


Top Kudoed Authors