【问题标题】:Visual Studio Code - Cucumber - Unable to find steps with special characterVisual Studio Code - Cucumber - 找不到带有特殊字符的步骤
【发布时间】:2020-01-02 14:18:56
【问题描述】:

我想就我在 vscode 和 cucumber 中遇到的错误寻求您的帮助。我有一个存在特殊字符的步骤(?)。在我的步骤定义文件中,我在“?”旁边使用“\\”。但是当我将它写在我的功能文件上时,它显示 无法找到黄色线上的“用户点击什么?”黄瓜自动完成的步骤。

非常感谢您的回复。谢谢!

【问题讨论】:

  • 制作这个帖子

标签: java selenium visual-studio-code cucumber


【解决方案1】:

只需使用单个 \ 来转义,如下所示

@Then("^user clicks on What this\?$")

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-01-14
    • 2020-08-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-26
    • 1970-01-01
    相关资源
    最近更新 更多