Hi!
I need to create some kind of RAII environment for my keywords…:
The idea is that in some situations, I want to execute a set of keywords with an action being taken before, and an action taken after.
I do so currently, by creating keywords which call other keywords:
Delegate run
... Nested keyword Some arguments
The “Delegate Run” keyword basically does some stuff before / after calling “Run keyword and ignore errors”
This works great, but has 2 downsides:
- nested keyword must be a single keyword. I cannot call multiple keywords within the same environment, so if I want to call multiple KWs I need to wrap them under a ‘meta-keyword’
- In terms of auto-completion, it kind of sucks, since the nested keyword will be considered as a simple argument to the “Delegate Run” keyword, and I won’t get autocompletion in my fav’ IDE for the nested KW arguments…
I doubt that I’m the only one who faced this issue, and maybe I don’t hard the proper words in mind to properly google it… but I haven’t found anyone online proposing a solid solution to my problem.
Is there one somewhere already implemented in robotframework? and if now, how would you go about implementing such feature?