I've a statement with integer value. I need to pass it to my test as an integer. How can I do that?




When my account number is 6298

Than my account will be 6298

Given my account number is 6298

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

answered by (171 points)
selected by
0 votes
Best answer
You can use (\\d+) for the same.


@When("^I add (\\d+) and (\\d+)$")
    public void adding(int arg1, int arg2) {