Setup/Teardown Robot Framework more than one keyword?

5.9k Views Asked by At

Is it possible to add to test Setup/Teardown procedure in Robot Framework more than one keyword?

1

There are 1 best solutions below

9
On BEST ANSWER

Yes. Use the Run Keywords keyword, and use the special argument AND to separate your keywords.

For example:

*** Settings ***
| Test Setup | Run keywords
| ... | A keyword | with | arguments
| ... | AND | Another keyword | with | arguments
| ... | AND | One more keyword

Note that my use of the pipe-separated format isn't intended to imply that it's the only format you can use in this situation. You can use any supported format with this solution. For example, here is the same thing using the space-separated format:

*** Settings ***
Test Setup    Run keywords    
...    A keyword    with    arguments
...    AND    Another keyword    with    arguments
...    AND    One more keyword