gpt4 book ai didi

cucumber - cucumber 的Lexing错误是什么?

转载 作者:行者123 更新时间:2023-12-04 21:52:09 47 4
gpt4 key购买 nike

我试图运行一个简单的Feature文件,但是却遇到了Exception这样的异常:
线程“主” cucumber.runtime.CucumberException中的异常:解析功能文件时出错。

这是由以下原因引起的:gherkin.lexer.LexingError:Lexing错误

我试图参数化When语句并得到以下异常:

Scenario: Login to Gmail

Given User is on Gmail login page
When User enters <userName> and <pwd>
And Clicks on login button
Then User should redirect to home page

scenario outline(tried Examples as well but didn't worked):
|userName | pwd |
|ravivani10 | abc |

最佳答案

方案大纲的正确语法是从关键字方案大纲:开始,并使用示例:列出示例。

Scenario Outline: Login to Gmail
Given User is on Gmail login page
When User enters <userName> and <pwd>
And Clicks on login button
Then User should redirect to home page
Examples:
| userName | pwd |
| ravivani10 | abc |

关于cucumber - cucumber 的Lexing错误是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26864021/

47 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com