Closed 51n15t9r closed 3 years ago
It's possible by just access scenario.sentence
for the name, scenario.id
for the id, ...
More or less everything which is passed to the ctor here: https://github.com/radish-bdd/radish/blob/bc8b9d174ac735d54558f1513f3f567af5d6a428/radish/scenario.py#L18
That is for the currently stable version of radish.
A Call to "print(scenario.sentence)" inside the step implementation, returns the following error -
File "/usr/local/lib/python3.6/site-packages/radish/stepmodel.py", line 122, in run self.definition_func(self, *args) # pylint: disable=not-callable
Same for other parameters in the ctor.
Full Stack Trace below -:
File "/usr/local/bin/radish", line 8, in
Thanks for pointing in the right direction. Got it working with : print(step.parent.sentence)
Important notices Before you add a new report, we ask you kindly to acknowledge the following:
[-] I have read the contributing guide lines at https://github.com/radish-bdd/radish/blob/master/.github/CONTRIBUTING.md
[-] I have read and respect the code of conduct at https://github.com/radish-bdd/radish/blob/master/.github/CODE_OF_CONDUCT.md
[-] I have searched the existing issues and I'm convinced that mine is new.
Ask your Question Ask your question here! If the question is related to a particular environment or behavior please make sure to add some context. Hi,
I was wondering if it's possible to get the Scenario description (name/text/id) inside the step python code. I've looked at the code and the documentation and could not find any API that allows me to do this.
If there's already some way to achieve this, can you point me to the documentation/code section?