robotframework - Return a value from a keyword in [setup] -


in keyword run in setup of test case have timestamp have use later in test case body. best way return test case body? have thought out use test-scope variable ideally pass return parameter.

to illustrate:

*** keywords *** setup keyword     ${ts} =    evaluate    <whatever>  *** test cases *** case1     [setup]    setup keyword     #here need ${ts} 

you can't return values in setup. 2 choices set test level variable in setup keyword (using set test variable keyword), or call setup keyword first step in test rather setup step. prefer former.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -