@then('I should be able to able to print with id "{el_id}"')
def step_impl(context, el_id):
if is_element_id_there(context, 'el_id'):
print(get_element_text_id(context, 'el_id'))
else:
raise Exception('Element with id: ' + el_id + ' not found')
I also used other way of printing by defining variable
@then('I should be able to able to print with id "{el_id}"')
def step_impl(context, el_id):
if is_element_id_there(context, 'el_id'):
var = get_element_text_id(context, 'el_id')
print(var)
else:
raise Exception('Element with id: ' + el_id + ' not found')
Note: I already added --no-colors
and --no-capture
in my bash profile