we are working on test automation using Cucumber-Java, Maven in Eclipse IDE below is the code which we are trying to execute but facing issues, kindly help us
I have also change default encoding to UTF-8
Cucumber code
# language: zh-CN
功能: 测试
场景: 注册负方案
而且 一世 开放 "https://accounts.coursera.org/signup" 网址 在 该 浏览器
Below is the step implementation
@而且("一世 开放 \"([^\"]*)\" 网址 在 该 浏览器")
public void i_go_to_URL_Chinese(String url) {
try {
String configuredURL = config.getString(url);
DriverFactory.getDriver().get(configuredURL);
System.err.println(DriverFactory.getDriver().getTitle());
} catch (Exception e) {
DriverFactory.getDriver().get(url);
}
}
I am facing errors in the cucumber syntax itself, below are the errors
error in the first line
missing 'Feature:' at '功能:'
error in the last line
required (...)+ loop did not match anything at input ''
How do we configure i18n in eclipse for cucumber-java? Do we need any special setup ? why is not recognizing Chinese script ?