I found a way to create dynamic test cases in Robot framework using below post, and its working good.
Robot framework: Is there a way to write dynamic test cases?
However, the problem I am facing is with assigning the return value of the keyword to a variable. I could not find the syntax for it using dynamic format. I tried some options, but none of them worked.
For example, if I want to write in Robot Framework:
${Results}= | SSHLibrary.Execute Command | pwd
Log | ${Results}
Attempt 1: I wrote in the dynamic syntax as:
test.keywords.create('${Results}= Execute Command', args=['pwd'])
test.keywords.create('Log', args=['${Results}'])
This gives me error:
No keyword with name '${Results}= Execute Command' found.
Attempt 2: Then I tried:
Results = test.keywords.create('Execute Command', args=['pwd'])
test.keywords.create('Log', args=[Results])
It just prints the command, not the output.
Pls advise! Thanks in advance.
