Reputation: 85
@step(u'Child step')
def login_to_something(context):
context.execute_steps(u'parent step 1')
context.execute_steps(u'parent step 2')
It is unable execute_steps as mentioned above for parent step 1 and it throws the following error:- "behave.parser.ParserError: Failed to parse "
Upvotes: 1
Views: 1240
Reputation: 1
Check the Indentations of your feature file. We also faced this issues multiple times.
Upvotes: 0
Reputation: 21
When the Behave engine is not able to identify or distinguish the steps within a step, probably the error you see. Then there is something probably not in semantic as expected by engine.
I got your point, yes the preposition should not matter and just the step is good enough.. But there is something missing in expected semantic so the parser error.
def login_to_something(context):
context.execute_steps('''
when write the step 1 here
then write the step 2 here
'''
)
I'm unable to get from more information shared by you in problem statement.
Upvotes: 2