I have a Cucumber Scenario Outline in which Examples table I would like to pass 6 space strings (" ") as value. In the Example table just leaving the value blank, passes an empty string. I tried with double and single quotes and it is the same. It passes 8 strings (including 2 quotes), instead of 6.
This is how the Scenario Outline looks like:
Scenario Outline: Change password - Negative Invalid Confirm Password
Given I log in as a user on the change password page
When I insert the current password
And I insert password
And I insert invalid confirm password <value>
And I move focus to another element on the change password page
Then <message> appears under the confirm password field
Examples:
|value |message |
|Aa1! |Passwords Invalid or Do Not Match |
|" " |Passwords Invalid or Do Not Match |
And this is how feature definition looks like:
When(/^I insert invalid confirmPassword (.*)$/, async (confirmNewPass:string) => {
await changePasswordPage.changePasswordComponent.insertConfirmNewPassword(confirmNewPass);
});