How to get the step name description using pytest-bdd?

36 Views Asked by At

I want to get this step description name "capture user logout option navigated screen" within the function. But not able to get it

@when(parsers.parse('capture "{user}" logout option navigated screen'), converters=CONVERTERS) def step_capture_login_option_navigated_screen(context, user, request): step_name = request.node.name

I have tried request.node.name but it's giving the Scenario name, but I need exact step name

0

There are 0 best solutions below