Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create a step definition that accepts 3 parameters? #200

Open
rajeshwarans88 opened this issue Jan 2, 2023 · 1 comment
Open

Comments

@rajeshwarans88
Copy link

Currently we are able to create a step definition with 2 parameters in StepDefiner.
Unable to add an extension locally since addStep is internal.
Is there any restriction that it should be only 2 parameters. Any suggestions to reuse existing implementation to use 3 parameters.

@tomleightonstars
Copy link

tomleightonstars commented Mar 13, 2023

@rajeshwarans88 yeah you can do this! an example...

step("The (.*) brown (.*) jumps over the lazy (.*)") { (parameters: StepMatches<String>) in
    let speed = parameters[0]
    let animalOne = parameters[1]
    let animalTwo = parameters[2]

    ...the rest of your step definition...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants