I have trying to pass non English strings as parameters using Cucumber for automation Testing. The language used is Java. But when these strings are passed from feature files to steps definitions, French characters such as 'é' are printed as '?'. Is there a way by which I can pass Non-English characters as parameters?
I am trying to pass the string 'Décoration murale'. But when this is printed in Step Definitions, 'é' is printed as '?' Please see the screenshot attached.
@tag
Feature: String Verifcations
@PassNonEnglishCharacters
Scenario Outline: Verify non English parameters
Given I have my driver ready
Then I print collection "<collection>" name on console
Examples:
| collection |
| Décoration murale |
@Then("^I print collection \"([^\"]*)\" name on console$")
public void i_print_collection_name_on_console(String collection) throws Throwable {
System.out.println("Collection:" +collection);
}
Outcome on Console:
**Collection:D?coration murale**