Cucumberish
Cucumberish copied to clipboard
Step implementation with parameters
I have Then
step in my .feature file
Then I have entered valid <username> and <password>
And also examples provided like:
Examples:
| username | password |
| "[email protected]" | "password" |
I stuck on swift implementation part and unable to write any correct swift code as I can't find any example or documentation. The simple steps without parameters are working as they should but I'm unable to match step implementation with step definition and even pass actual arguments. Everything I found is usual steps without parameters or it's obj-c code. If anyone can help me with step definition in Swift for this particular step I'll be more than happy.
@David-Grigoryan
How about write scenarios outline as follow?
Examples:
| username | password |
| [email protected] | xxxxxx |
You don't need to add commas around your identifier
Examples:
| username | password | username field | password field |
| [email protected] | password | username_textfield | password_textfield |
And then use like this OR use as per your step defination
And i type "<username>" into "<username field>"
And i type "<password>" into "<password field>"