Cecilia4585
Cecilia4585

Reputation: 29

How can I put a String message with a line break in gherkin?

Example: Then I get the message "Registration successful

Welcome Administrator"

Upvotes: 0

Views: 1402

Answers (1)

M.P. Korstanje
M.P. Korstanje

Reputation: 12029

You can use doc strings in Gherkin:

Then the message reads
"""
Hello

World
"""

In your step definition you can use the String parameter type.

Upvotes: 1

Related Questions