Cucumber-Java i18n zh-CN in eclipse not working

﹥>﹥吖頭↗ 提交于 2019-12-12 02:29:06

问题


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 ?

来源:https://stackoverflow.com/questions/33326720/cucumber-java-i18n-zh-cn-in-eclipse-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!