Search code examples
seleniumcucumberbddcucumber-java

Cucumber example inputs are received incorrectly


Cucumber Version: 11.0

Facing a weird issue that first example input parameters are being taken along with other column values.

**Feature:** Some feature

  @foo
  **Scenario Outline:** Testing.
    Given Send Request and Validate response <language> <location> <address>
    **Examples:**
      | language | location | address |
      | test     | tt       | foo     |
      | test pp  | mm       | boo     |
      
      
  @Given("^Given Send Request and Validate response (.*) (.*) (.*)$")
  public void Send_Request_and_Validate_response(String language, String location, String address) throws Throwable {

        System.out.println("The language is " + language);
        System.out.println("The location is " + location);

Expected:-

The language is test 
The location is tt

The language is test pp
The location is mm

Actual:-

The language is test tt
The location is foo

The language is test pp
The location is mm

I am not sure why the first parameter 'language' in first inputs alone print 'tt' which is given under location. I see no such issue from second input. Any help?


Solution

  • Pls check if there are any special hidden characters between the demarcation line (i.e. | ) between "test" and "tt"

    enter image description here