运行功能文件并出现错误时,我已经设置了所有基本的插件和驱动程序

时间:2018-06-28 07:32:59

标签: java selenium cucumber gherkin lexicon

我正在Itellij IDEA上运行它。

我有必要的插件和驱动程序,但无法弄清楚为什么会出现此错误。

enter image description here

请在图片中找到代码

enter image description here

Exception in thread "main" cucumber.runtime.CucumberException: Error parsing feature file C:/Users/IBM_ADMIN/IdeaProjects/redbusservices/src/test/resources/feature/Login.feature
    at cucumber.runtime.FeatureBuilder.parse(FeatureBuilder.java:133)
    at cucumber.runtime.model.CucumberFeature.loadFromFeaturePath(CucumberFeature.java:104)
    at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:54)
    at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:34)
    at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:239)
    at cucumber.runtime.Runtime.run(Runtime.java:111)
    at cucumber.api.cli.Main.run(Main.java:36)
    at cucumber.api.cli.Main.main(Main.java:18)
Caused by: gherkin.lexer.LexingError: Lexing error on line 1: 'Feature : Scenarios for login into Redbus

1 个答案:

答案 0 :(得分:0)

功能文件中Feature关键字之后(或冒号之前)有一个空格。 请按照以下说明将其删除,然后错误会消失。

Feature: Scenarios for login into Redbus